Fri Jul 13 16:16:27 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* common/prefix.c (__get_dde_prefix): Avoid reading from NULL when
	SWI DDEUtils_ReadPrefix is not defined, nor Prefix$Dir is set.
	Fixes bug #241.

Wed May 16 02:38:43 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/mkstemp.c (mkstemp): Change O_TRUNC into O_EXCL.
	(mkstemp64): Add.
	* include/stdlib.h (mkstemp64): Add.
	* stdio/tmpfile.c (generate_temporary_filename): Simplify. Improve
	template checking.  Add offset to start index.
	(get_tmpdir, isdir): Add.
	(__tmpbuf): Adjust length to L_tmpnam.
	(tmpnam, tmpnam_r): Support __RISCOSIFY_NO_PROCESS case.  Fixes bug
	#238.
	(tempnam): Remove strategy 4, was the same as 3.  Support
	__RISCOSIFY_NO_PROCESS case.

Sat May  5 00:30:08 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/fd.h (BADF): Simplify expression.
	* debug/debug.c (debug_printf): Dump more info on file handles.
	* unix/dev.c (__fsclose): Detach OS_ChangeRedirection handle we're
	about to close.  Fixes bug 236.
	* test/sys/bug236.c: Added.
	* test/sys/test236.c: Likewise.

Tue May  1 21:33:26 CEST 2012  Chris Gransden  <chrisg@care4free.net>

	* incl-local/sys/socket.h (_sendto): Fix return value.  Fixes bug 233.

Tue May  1 17:28:14 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* unix/glob.c (glob, glob3): Avoid the use of mbrtowc.  Fixes bug 231.

Tue May  1 16:03:56 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* sys/exec.c (execve): Add checks for alias-disabling prefix. Fixes bug
	232.
	Fix DEBUG build.  Add missing test for __riscosify_std failure.
	* test/stdlib/system-alias.c: Added.

Sat Apr 28 19:02:48 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/dirent.h (struct __dir_stream): Made dd_name_can const
	pointer.
	* common/serial.c (__get_file_ino): Fix the directory + filename case.
	Simplified code.  Made inode calculation unsigned.
	* test/dirent/tst-dirent-ino.c: Added.

Sat Apr 28 15:37:26 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* unix/glob.c (g_Ctoc): Reimplement and avoid the wcrtomb call.  Fixes
	bug 229.

Thu Apr 26 03:32:38 CEST 2012  John Tytgat  <John.Tytgat@aaug.net>

	* unix/getcwd.c (getcwd): Support buffer being NULL.  Fixes bug 227.
	* test/unix/getcwd.c: Enhance test case.

Wed Apr 25 20:57:01 BST 2012  Lee Noar  <leenoar@sky.com>

	* time/broken.c(SWI_Territory_ConvertOrdinalsToTime): Add
	missing return statement. Fix for bug 226.

Thu Mar 22 19:56:15 GMT 2012  Lee Noar  <leenoar@sky.com>

	* include/sys/elf.h(DT_RISCOS_PIC,DT_RISCOS_ABI_VERSION):
	Define.
	* gen-auto.pl: Generate file misc/abi.c.
	* Makefile.am: Add misc/abi.c to list of files to compile.

Sun Mar 11 18:59:09 GMT 2012  Lee Noar  <leenoar@sky.com>

	* include/stdio.h: Fix build in 4.1.2 branch. fgets.c
	defines a strong alias for fgets_unlocked, so this define
	is no longer required.

Sat Mar  3 17:37:27 CET 2012  John Tytgat  <John.Tytgat@aaug.net>

	* netlib/get_ro_socket.c: Add.
	* include/unixlib/local.h (__get_ro_socket): Add.
	* Makefile.am (netlib_src): Add netlib/get_ro_socket.c.

Fri Mar  2 22:51:55 CET 2012  John Tytgat  <John.Tytgat@aaug.net>

	* unix/features.c (__sfix_default): Remove "a".
	* common/riscosify.c (__sfix_default): Likewise.

Thu Mar 01 14:51:32 GMT 2012  Lee Noar  <leenoar@sky.com>

	* stdio/fpos.c(fseeko64): Fix offset sanity check. This fixes
	the "Value too large for defined data type" errors in GAS.
	Already fixed on trunk in r5495.

Sat Feb 18 11:44:27 GMT 2012  Lee Noar  <leenoar@sky.com>

	* unistd/symlink.c(symlink): More compact code and better
	error handling.

Fri Feb 17 20:36:11 GMT 2012  Lee Noar  <leenoar@sky.com>

	* unistd/symlink.c(symlink): Implement writing of symlink
	files.

Sat Feb  4 12:04:02 GMT 2012  Lee Noar  <leenoar@sky.com>

	* include/sys/mman.h: Define MADV_FREE (even though we
	don't support madvise).
	* pthread/sem.c (sem_timedwait): Dummy function to prevent
	linker errors in programs that reference it.

Thu Feb  2 22:54:49 GMT 2012  Lee Noar  <leenoar@sky.com>

	* unix/dev.c (__fslseek): File pointer should be set based
	on the old value of lpos not being 0.

Thu Feb  2 20:39:37 GMT 2012  Lee Noar  <leenoar@sky.com>

	* unix/dev.c (__fslseek): For SEEK_CUR, return the current
	file pointer even if lpos is 0.

Sat Jan 21 17:39:02 GMT 2012  Lee Noar  <leenoar@sky.com>

	* include/dlfcn.h: Define RTLD_LOCAL.

Tue Jan 10 23:24:55 CET 2012  John Tytgat  <John.Tytgat@aaug.net>

	* include/stdlib.h (realloc): Drop malloc attribute.

Thu Dec 29 22:01:36 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* debug/dvsprintf.c (UNIXLIB_STDERR): Remove support (causes more
	trouble than it is able to pinpoint).

Thu Dec 29 21:50:41 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/printf.c: Minor cleanup.
	* stdio/newstream.c: Likewise.
	* string/mempcpy.c: White space change.
	* string/strdup.c: Likewise.
	* wchar/wmempcpy.c
	* stdio/fgets.c (fgets): Remove test on input parameters.
	Simplify (remove test on ferror).
	* stdio/gets.c (gets): Likewise.
	* stdio/flsbuf.c (__flslbbuf): Minor cleanup.
	(__flsbuf): Add check on writable streams. Use size_t instead of
	int as type for number of bytes to write. Fix return value check
	of write.
	* stdio/filbuf.c (check_stream): A non-readable stream should
	set stream in error state.  Move EOF check to...
	(__filbuf): ...here. Use ssize_t instead of int.
	(fill_buffer): Minor cleanup.  Use ssize_t instead of int.
	(__peek_char): Add check on EOF.  Use ssize_t instead of int.
	* unix/scl_lseek.c (lseek): Fix fseeko return value check.
	* unix/dev.c (__fsopen): Minor cleanup.
	* locale/localeconv.c (xfree): Remove.
	(localeconv): Use free directly.

Mon Dec 26 16:06:13 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/fpurge.c (__fpurge): Define as strong alias of fpurge.
	(fpurge): Drop unused variable.

Mon Dec 26 16:04:12 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/stdio.h (struct __iobuf): Change type of __offset from
	fpos_t to __off_t.

Fri Dec  9 20:01:02 GMT 2011  Lee Noar  <leenoar@sky.com>

	* pthread/_context.s (__pthread_callback): After a jump to
	skip_contextswitch, ip is the PIC register, not v4.

Wed Dec  7 00:40:14 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/scl_fdopen.c (fdopen): Use __FD_SOCKET_OFFSET instead of
	_SYS_OPEN.
	* stdio/scl_fileno.c (fileno): Simplify implementation.
	* unix/ul_readv.c (readv): Count being 0 is not an error.  Check
	for ssize_t overflow.
	* unix/ul_writev.c (writev): Likewise.
	* unix/scl_readv.c (readv): Support file based fd (based on
	unix/ul_readv.c).
	* unix/scl_writev.c (writev): Support file based fd (based on
	unix/ul_writev.c).
	* unix/scl_write.c (write): Support file based fd.
	* unix/scl_read.c (read): Likewise.
	* unix/open.c: Renamed to...
	* unix/ul_open.c: ...this.
	* unix/isatty.c: Renamed to...
	* unix/ul_isatty.c: ...this.
	* unix/scl_open.c: Add (migrated from libscl's riscos/riscos.c).
	Reworked implementation.
	* unix/scl_isatty.c: Likewise.
	* unix/scl_lseek.c (lseek, lseek64): Add support for file based fd.
	* unix/scl_close.c (close): Likewise.
	* unix/scl_ioctl.c (ioctl): Likewise.
	* doc/SCL/COPYING: Add (migrated from libscl's COPYING).
	* COPYING: Moved to...
	* doc/UnixLib/COPYING: ...here.
	* COPYING: Add (refering to doc/SCL/COPYING and
	doc/UnixLib/COPYING).
	* include/unixlib/types.h (__FD_SOCKET_OFFSET): Add.
	* include/sys/select.h (FD_SETSIZE): Define as __FD_SETSIZE.
	(__FDELT, __FDMASK): Take __FD_SOCKET_OFFSET into account.
	* netlib/setsockopt.c (setsockopt): Add check on non-socket fd
	values.  Take __FD_SOCKET_OFFSET into account.
	* include/stdio.h (FOPEN_MAX): Change from 8 to _SYS_OPEN.
	(_SYS_OPEN): Define as __FD_SOCKET_OFFSET.
	* include/unistd.h (isatty, unlink): Define for SCL.
	* netlib/accept.c (accept): Likewise.
	* netlib/sendmsg.c (sendmsg): Likewise.
	* netlib/recvmsg.c (recvmsg): Likewise.
	* netlib/getpeernam.c (getpeername): Likewise.
	* netlib/send.c (send): Likewise.
	* netlib/listen.c (listen): Likewise.
	* netlib/recv.c (recv): Likewise.
	* netlib/shutdown.c (shutdown): Likewise.
	* netlib/bind.c (bind): Likewise.
	* netlib/getsockopt.c (getsockopt): Likewise.
	* netlib/recvfrom.c (recvfrom): Likewise.
	* netlib/connect.c (connect): Likewise.
	* netlib/getsocknam.c (getsockname): Likewise.
	* netlib/sendto.c (sendto): Likewise.
	* netlib/socket.c (socket): Add __FD_SOCKET_OFFSET.
	* scl/chunkid02.s (unlink): Add as alias to remove.
	* Makefile.am: Follow rename unix/isatty.c to unix/ul_isatty.c,
	unix/open.c to unix/ul_open.c.
	(unix/scl_isatty, unix/scl_open): Add.
	* incl-local/internal/os.h (SWI_OS_File_ReadCatInfo): Add.
	(SWI_OS_Args_GetFileHandleStatus): Add.

Sun Dec  4 16:21:58 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* contrib/Help: Moved to...
	* doc/UnixLib/Help: ...here.
	* README: Moved to...
	* doc/UnixLib/README: ...here.
	* doc/SCL/README: Add.  Updated libscl's README.

Tue Nov 22 02:15:11 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/freopen.c (freopen64): Add dummy implementation.
	* stdio/tmpfile.c (tmpfile64): Likewise.
	* stdio/ul_fopen.c (fopen64): Likewise.
	* stdio/fpos.c (fgetpos64, fsetpos64, fseeko64, ftello64): Likewise.
	* unix/creat.c (creat64): Likewise.
	* unix/open.c (open64): Likewise.
	* unistd/lockf.c (lockf64): Likewise.
	* include/fcntl.h (open64, creat64, lockf64): Add prototypes.

Sat Nov 12 00:19:57 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/fenv.h (feenableexcept, fedisableexcept, fegetexcept):
	Add.
	* include/time.h, include/time.h, include/sys/select.h,
	include/getopt.h, include/string.h, include/wchar.h,
	include/search.h, include/unistd.h: Disable function prototypes for
	non-supported functions in SCL build.

Thu Nov  3 11:04:12 GMT 2011  Lee Noar  <leenoar@sky.com>

	* unix/getcwd.c (getcwd): Fix potential buffer overflow.
	getcwd() should set errno to ERANGE and return NULL if the size
	of the buffer supplied is too small for the path. It would
	appear that it relies on unixify() to do this, however, unixify()
	only checks for buffer overflow when the path does not require
	any processing. As RISC OS itself is supplying the path, then by
	default it will always require processing to unix format, so buffer
	overflow is never detected. Fix by adding an explicit check before
	calling unixify().

Tue Nov  1 21:42:53 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* unix/ul_lseek.c (lseek): Change off_t into __off_t.
	(lseek64): Change off_t into __off64_t.  Add check on __off64_t
	into __off_t overflow.
	* scl/chunkid05.s: Remove wrong entry after scalbln.  Add entries
	from isblank to tmpfile64.
	* include/unixlib/buildoptions.h (__UNIXLIB_LFS64_SUPPORT): Add.
	* include/unixlib/types.h (__off_t): Fix for UnixLib case.
	(__off64_t): Define as __quad_t, not __loff_t.
	* include/sys/types.h (__loff_t): Remove.
	* include/sys/stat.h (off_t): Support __USE_FILE_OFFSET64 and
	__USE_LARGEFILE64.
	* include/stdio.h (off_t, fpos_t): Support __USE_FILE_OFFSET64 and
	__USE_LARGEFILE64.
	(fopen, freopen): Likewise.
	(fgetpos, fsetpos): Likewise.
	(ftell, fseek): Likewise.
	(tmpfile): Likewise.
	(TEMP_FAILURE_RETRY): Move to unistd.h.
	(fopen64, freopen64, fgetpos64, fsetpos64, ftello, fseeko,
	ftello64, fseeko64, tmpfile64): Add.
	* include/unistd.h (off_t): Support __USE_FILE_OFFSET64 and
	__USE_LARGEFILE64.
	(TEMP_FAILURE_RETRY): Add (changed version from stdio.h).

Sun Oct 30 20:34:23 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/errno.h (EILSEQ, EOVERFLOW, EFBIG): Reassigned values for
	SCL configuration to match recent ROOL CLib changes.
	(EPERM, ENOENT, ESRCH, EINTR, EIO, ENXIO): Reassigned values for
	SCL configuration to avoid aliasing other error values.
	* sys/errlist.c: Follow errno.h changes.
	* Makefile.am (time/adjtime): Removed from SCL build.

Fri Oct 28 04:04:12 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* Makefile.am: Workaround for automake conditionals limitation.

Thu Oct 27 01:36:00 BST 2011  John-Mark Bell  <jmb@netsurf-browser.org>

	* sys/_syslib.s: Prevent stack extension trampling the signal handler 
	stack chunk. This is achieved by inserting an 8 byte gap between the 
	signal handler stack and the initial stack chunk which is then used 
	by the stack allocator for its heap metadata.
	* sys/stackalloc.c (__stackalloc_init): Reflect above change, and
	ensure that the signal handler block size/startofcon fields are
	initialised to sane values such that the block is left alone when
	stack extension takes place. The initial location of dummytopblock
	is now above the signal handler stack.
	* test/sys/stackextension.c: Test for above issue.

Mon Sep 26 00:41:39 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* time/stdtime.c (SWI_Territory_ConvertDateAndTime): Add missing
	buffer specification.  Bug #223.

Thu Sep  8 00:10:25 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (find_terminator): Remove.
	(check_io_redir): Support for double quoted redirection filenames.
	(get_io_redir): Simplify calls to check_io_redir.
	Bug #221.

Wed Sep  7 00:08:02 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/fread.c (fread): Set EOF when last byte is read.
	Fix returned number of objects read when there is a partial one read.

Sat Aug 27 20:34:12 2011  Lee Noar <leenoar@sky.com>

	* unix/getcwd.c(getcwd): Only free ro_path if it was
	allocated with malloc in the first place.

Sat Jul  2 15:14:30 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/glob.h: Copy from FreeBSD 8.0.0 with a couple of
	UnixLib changes.  Solves bug #220.
	* unix/glob.c: Likewise.

Sun May 29 18:32:56 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/sys/stat.h (S_IFBLK, S_IFLNK): Renumber.
	(S_IFMT): Trim bits.
	(S_ISREG, S_ISFIFO, S_ISLNK): Use S_IFMT mask so that
	result is 0 or 1.

Sun May 29 17:21:43 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dev.c (__fsopen): Return ENOENT iso EAGAIN when unexisting
	file is opened without O_CREAT set.

Sun Apr 24 13:16:13 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* string/strdup.c (strdup): Don't check on NULL parameter.
	It's nowhere documented we should.

Wed Apr  6 03:27:25 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (convert_command_line): Use __canonicalise_path
	instead of __os_swi.
	* unix/dirent.c (newstream): Likewise.
	* unix/truncate.c (ftruncate, truncate): Use SWI_OS_Args_* instead
	of __os_args.
	* unix/sync.c (sync, fsync): Likewise.
	* unix/open.c (__open_fh): Follow rename __fd_to_name to
	__canonicalise_handle.
	* unix/pathconf.c (fpathconf): Use SWI_OS_Args_Canonicalise instead
	of __fd_to_name.
	* unix/fchmod.c (fchmod): Likewise.
	* debug/debug.c (__debug): Likewise. Print filename for DEV_PIPE
	handles as well.
	* stdlib/realpath.c (realpath): Use SWI_OS_FSControl_Canonicalise
	instead of __os_swi.
	* unix/chdir.c (chdir): Likewise.
	* common/serial.c (__get_file_ino): Likewise.
	* unix/getcwd.c (getcwd): Likewise.
	(getwd): Move to...
	* unix/getwd.c: ...here.
	* unix/dev.c (__fsopen): Use SWI_OS_FSControl_Canonicalise instead of
	__os_swi.
	(__fsclose, __fsfstat): Follow rename __fd_to_name to
	__canonicalise_handle.
	(__fslseek,__fsfstat,__pipewrite,__pipeselect): Use SWI_OS_Args_*
	instead of __os_args.
	* unix/tty.c (__tty_console_gterm): Fix compiler warning.
	* sound/dsp.c (__dspopen): Likewise.
	* time/gmtime_r.c (SWI_Territory_ConvertTimeToUTCOrdinals): Likewise.
	* time/broken.c (SWI_Territory_ConvertOrdinalsToTime): Likewise.
	* time/localtime_r.c (SWI_Territory_ConvertTimeToOrdinals): Likewise.
	* sys/_syslib.s (__ul_global): Move to...
	* common/global.c: ...here.
	* common/canonicalise_path.c (__canonicalise_path): Add.
	* common/fdname.c (__fd_to_name): Removed and reimplemented same in...
	* common/canonicalise_handle.c (__canonicalise_handle): ...here.
	* Makefile.am (common/canonicalise_handle.c,common/canonicalise_path.c,
	common/global.c,unix/getwd.c): Add.
	common/fdname.c: Remove.
	* incl-local/internal/local.h (__fd_to_name): Remove.
	(__canonicalise_path,__canonicalise_handle): Add.
	* incl-local/internal/asm_dec.s (GBL_*): Update for GBL_UL_OUT_PATHNAME
	entry.
	* incl-local/internal/os.h (__os_args): Remove.
	(SWI_OS_FSControl_Canonicalise,SWI_OS_Args_GetFilePtr,
	SWI_OS_Args_SetFilePtr,SWI_OS_Args_GetExtent,SWI_OS_Args_SetExtent,
	SWI_OS_Args_Canonicalise,SWI_OS_Args_Flush): Add.
	* sys/_os.s (__os_args): Remove.
	* incl-local/internal/unix.h (ul_global::ul_out_pathname): Add.
	Add comments.
	* sys/exec.c (execve): Use SWI_OS_FSControl_Canonicalise instead of
	__os_swi.  Fill in __ul_global.ul_out_pathname.  Use SWI_OS_Args_*
	instead of __os_args.
	* sys/vfork.c (__fork_post): Fix stdout redirection when non-UL
	processes are exec'd by reopening output handle.

Sun Apr  3 20:27:41 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/os.h (SWI_OS_Byte): Renamed from __os_byte. Only
	write output registers when no error happened.  Mark as always to
	inline.
	(SWI_OS_CLI): Renamed from __os_cli.  Mark as always to inline.
	(SWI_OS_ChangeRedirection,SWI_DDEUtils_SetCLSize,SWI_DDEUtils_SetCL,
	SWI_DDEUtils_GetCLSize,SWI_DDEUtils_GetCL,SWI_DDEUtils_Prefix,
	SWI_DDEUtils_ReadPrefix): Add.
	* unix/unix.c (__unixinit,initialise_unix_io): Make use of new SWI_*
	calls.
	* unix/gethostnam.c (fakehostname): Likewise.
	* unix/dev.c (__randomopen): Likewise.
	* unix/tty.c (__tty_console_gterm, __tty_console_sterm, __ttyicanon):
	Likewise.
	* unix/chdir.c (chdir): Likewise.
	* sound/dsp (__dspopen): Likewise.
	* common/prefix.c (__get_dde_prefix): Likewise.
	* gmon/machine-gmon.c (load_hal26_module): Likewise.
	* sys/exec.c (set_dde_cli, execve): Likewise.
	* sys/vfork.c (__fork_post): Likewise.
	* time/gmtime_r.c, time/stdtime.c, time/broken.c, time/localtime_r.c,
	time/clock.c, locale/iconv.c, common/env.c, incl-local/sys/socket.h:
	Mark inline assembler as always to inline.

Sun Apr  3 15:10:40 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* sys/errlist.c (sys_errlist): Change entry 0 from "Error 0"
	to "Success".

Sat Apr  2 02:17:17 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* time/_clock.s (clock): Removed.
	* time/clock.c (clock): Add.
	* Makefile.am: Follow changes.

Tue Mar 29 23:14:41 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* Makefile.am (common/cvttime.c): Add to SCL build.
	(time/utimes.c): Remove from SCL build.
	(time/calendconv.c): Remove.
	* time/calendconv.c: Remove after merging its contents as inline
	assembler with...
	* time/gmtime_r.c (gmtime_r): ...this and...
	(SWI_Territory_ConvertTimeToUTCOrdinals): Add.
	* time/localtime_r.c (localtime_r): ...this.
	(SWI_Territory_ConvertTimeToOrdinals): Add.
	* incl-local/time.h (__cvt_broken_time): Change return type from void
	to const _kernel_oserror.
	* time/asctime_r.c (asctime_r): Check return value __cvt_broken_time.
	* time/mktime.c (mktime): Likewise.
	* time/strftime.c (strftime): Likewise.
	* time/stdtime.c (__standard_time): Use inline assembler.
	(SWI_Territory_ConvertDateAndTime): Add.
	* time/broken.c (__cvt_broken_time): Use inline assembler.
	(SWI_Territory_ConvertOrdinalsToTime): Add.
	(__cvt_broken_time): Return error if there was one.
	* incl-local/locale.h (__locale_territory, __setlocale_called,
	__build_ctype_tables): Don't prototype these for SCL build.
	* incl-local/internal/os.h (__ul_seterr): Fix outdated comment.

Tue Mar 29 00:52:27 CEST 2011  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/os.h (__os_cli, __os_byte): Change into inline
	assembler versions.
	* sys/_os.s (__os_cli,__os_bytes): Remove.
	* unix/unix.c (__unixinit, _exit): Follow __os_byte API change.
	* unix/gethostnam.c (fakehostname): Likewise.
	* sys/vfork.c (__fork_post): Likewise.
	* unix/tty.c (__tty_console_gterm, __tty_console_sterm, __ttyicanon):
	Likewise.
	* locale/iconv.c (iconv_open, iconv, iconv_close): Don't use __os_swi
	but use SWI_Iconv_Open, SWI_Iconv_Iconv and SWI_Iconv_Close.
	(SWI_Iconv_Open, SWI_Iconv_Iconv, SWI_Iconv_Close): Add.
	* configure.ac (AC_OUTPUT): Add test/iconv/Makefile.
	* test/iconv/{test-iconv-h.c,signature.h,test-iconv-utf.c,
	test-iconv-h-c++.cc,macros.h,test-iconv.c
	* test/iconv/config.h: Add.
	* string/strnicmp.c (strncasecmp): Add strong alias for SCL case as
	well.

Tue Mar 22 01:04:59 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* include/netinet/in.h: Sync with glibc 2.11.
	* include/bits/sockaddr.h: Likewise.
	* include/bits/byteswap.h: Likewise.
	* include/bits/in.h: Likewise.
	* include/sys/socket.h: Likewise.
	* include/bits/socket.h: Likewise (i.e. use 4.4 BSD version instead
	of 4.3 BSD).
	* incl-local/sys/socket.h (__SYS_SOCKET_H): Trim one leading
	underscore.
	* include/endian.h (__ENDIAN_H): Trim one leading underscore.
	* include/sys/byteorder.h: Likewise.

Sat Mar 12 15:04:27 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/perror.c (perror): Add check on empty string.

Wed Mar  2 23:43:45 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* signal/killpg.c: Add.
	* Makefile.am (killpg): Add.
	* include/signal.h (kill, killpg): Conditionalize declarations.

Tue Mar  1 23:29:38 CET 2011  Jeffrey Lee  <me@phlamethrower.co.uk>

	* sys/_getcpuarch.s (__get_cpu_arch): Support ARM arch 7.

Tue Feb  8 03:17:42 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* Makefile.am: Revert previous change.  This wrongly results in PIC
	enabled libunixlib.a archives.

Sat Feb  5 10:55:00 UTC 2011  John-Mark Bell  <jmb@netsurf-browser.org>

	* module/sul.s: Test the existence of the canonicalised	filename on
	program initialisation, rather than the original sul_exec() argument. 
	Fixes detection of child application that lives on Run$Path. 
	Additionally, fix stripping of FS name in process structure search to
	accept the program name provided by OS_GetEnv having no colons in it 
	(e.g. when it resides on RPCEmu's HostFS). Otherwise, it will skip over
	the first entry in the process list without considering it. 
	Bump version number and update copyright years.

Wed Feb  2 00:29:05 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* Makefile.am: Avoid overruling targets needing custom CFLAGS by
	splitting libunixlib in two libraries.

Tue Jan 25 19:59:02 2011  Lee Noar  <leenoar@sky.com>

	* scl/chunkid01.s: Make sure bss section has word alignment.
	* scl/chunkid02.s: Likewise.

Sun Jan 23 19:02:26 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* kernel/kosfile.s (_kernel_osfile): Fix based on the fact that 2nd
	parameter can not be NULL.

Mon Jan 17 23:11:28 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* COPYING: Update copyright year.
	* crypt/crypt-entry.c: Poison for SCL build.
	* crypt/md5.c,crypt/md5-crypt.c,fenv/fclrexcpt.c,fenv/fedisblxcpt.c,
	fenv/feenablxcpt.c,fenv/fegetenv.c,fenv/fegetexcept.c,
	fenv/fegetround.c,fenv/feholdexcpt.c,fenv/fesetenv.c,fenv/fesetround.c,
	fenv/fraiseexcpt.c,fenv/fsetexcptflg.c,fenv/ftestexcept.c,
	gmon/gmon-start.c,gmon/profil.c,misc/dirname.c,netlib/ul_in6_addr.c,
	resolv/ul_opensock.c,resolv/ul_res_hconf.c,search/hsearch.c,
	search/insremque.c,search/lsearch.c,search/tsearch.c,signal/sleep.c,
	stdlib/msort.c,stdlib/xpg_basename.c,string/basename.c,string/memrchr.c,
	string/rawmemchr.c,string/strchrnul.c,string/strndup.c,string/strnlen.c,
	string/swab.c,sys/alarm.c,unistd/getpass.c,unistd/lockf.c,unix/getopt1.c,
	unix/getopt.c,unix/pselect.c,wchar/btowc.c,wchar/mbrlen.c,wchar/mbrtowc.c,
	wchar/mbsinit.c,wchar/mbsnrtowcs.c,wchar/mbsrtowcs.c,wchar/wcpcpy.c,
	wchar/wcpncpy.c,wchar/wcrtomb.c,wchar/wcscat.c,wchar/wcschr.c,
	wchar/wcscmp.c,,wchar/wcscoll.c,wchar/wcscpy.c,wchar/wcscspn.c,
	wchar/wcsdup.c,wchar/wcslen.c,wchar/wcsncat.c,wchar/wcsncmp.c,
	wchar/wcsncpy.c,wchar/wcsnrtombs.c,wchar/wcspbrk.c,wchar/wcsrchr.c,
	wchar/wcsrtombs.c,wchar/wcsspn.c,wchar/wcsstr.c,wchar/wcstok.c,
	wchar/wcswidth.c,wchar/wctob.c,wchar/wcwidth.c,wchar/wmemchr.c,
	wchar/wmemcmp.c,wchar/wmemcpy.c,wchar/wmemmove.c,wchar/wmemset.c:
	Likewise.
	* Makefile.am: Add comment libm-complex, libm-dbl64, lib-m-flt32 and
	libm-generic sources should not be used in SCL build.

Sun Jan 16 19:24:04 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* string/stricmp.c (strcasecmp): Enable as strong alias for stricmp
	in SCL build.
	* string/strdup.c (strdup, __strdup): Minor cleanup.

Sat Jan 15 22:33:33 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/elf-macros.s (CHGMODE): Fix bug exposed by
	binutils 2.21.

Mon Jan 10 03:24:52 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* resource/getrlimit.c (getrlimit): Follow prototype change.
	* resource/setrlimit.c (setrlimit): Likewise.
	* resource/getrusage.c (getrusage): Likewise.
	* resource/getprior.c (getpriority): Likewise.
	* resource/setprior.c (setpriority): Likewise.
	* include/sys/resource.h: Split off types to...
	* include/bits/resource.h: ...this new file.
	* include/sys/resource.h (__rlimit_resource_t, __rusage_who_t,
	__priority_which_t): New types which are either int or enum.
	* include/sys/wait.h: Hard include sys/resource.h.
	(wait3, wait4): Conditional declaration.
	* Makefile.am (bits/resource.h): Add.

Mon Jan 10 02:31:26 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* string/mempcpy.c (mempcpy): New.
	* include/string.h (mempcpy): Declare.
	* wchar/wmempcpy.c (wmempcpy): New.
	* include/wchar.h (wmempcpy): Declare.
	* Makefile.am (string/mempcpy.c, wchar/wmempcpy): Add.
	* stdlib/msort.c (msort_with_tmp): Use __mempcpy.

Wed Jan  5 00:42:46 CET 2011  John Tytgat  <John.Tytgat@aaug.net>

	* README: Latest iconv version is 0.11.

Mon Nov 29 23:23:47 CET 2010  Jeffrey Lee  <me@phlamethrower.co.uk>
			      John Tytgat  <John.Tytgat@aaug.net>

	* include/sys/mman.h (msync): Update comment.
	* sys/mman.c (mmap_info): Add flags, fd and offset.
	(mmap): Remove check DA being enabled for heap usage.
	(msync): Add basic implementation.
	(munmap): Flush changes.
	(mremap): Add check on unsupported case of remapping mapped files.

Sun Oct  3 17:08:22 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* signal/post.c: Minor cleanups.
	* gdtoa/arith.h: Add ARM/VFP case.

Sun Oct  3 14:28:27 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/math.h: Only include bits/huge_vall.h when
	__NO_LONG_DOUBLE_MATH is not defined.
	* include/bits/huge_val.h(HUGE_VAL): Fix ARM/FPA case when explicit
	values were used.  Implement ARM/VFP case.
	* include/bits/huge_vall.h: Removed.
	* Makefile.am(bits/huge_vall.h): Removed.

Sun Oct  3 11:42:13 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/defines.h(__ARM_ARCH__,__ARM_ARCH_STR__): Added
	tests on __ARM_ARCH_6T2__,__ARM_ARCH_6M__ and __ARM_ARCH_7EM__.

Sun Oct  3 01:49:42 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/strtoul.c, stdlib/strtoull.c, stdlib/strtoll.c,
	stdlib/random.c, dlib/strtol.c, stdio/floatio.h, gdtoa/dmisc.c,
	gdtoa/dtoa.c, gdtoa/fpmath.h, gdtoa/g_ddfmt.c, gdtoa/g_dfmt.c,
	gdtoa/gdtoa.c, gdtoa/gdtoa.h, gdtoa/gdtoaimp.h, gdtoa/gethex.c,
	gdtoa/g_ffmt.c, gdtoa/g__fmt.c, gdtoa/glue.c, gdtoa/gmisc.c,
	gdtoa/g_Qfmt.c, gdtoa/g_xfmt.c, gdtoa/g_xLfmt.c, gdtoa/hd_init.c,
	gdtoa/_hdtoa.c, gdtoa/hexnan.c, gdtoa/misc.c, gdtoa/README,
	gdtoa/smisc.c, gdtoa/strtod.c, gdtoa/strtodg.c, gdtoa/strtodI.c,
	gdtoa/strtof.c, gdtoa/strtoId.c, gdtoa/strtoIdd.c, gdtoa/strtoIf.c,
	gdtoa/strtoIg.c, gdtoa/strtoIQ.c, gdtoa/strtoIx.c, gdtoa/strtoIxL.c,
	gdtoa/strtopd.c, gdtoa/strtopdd.c, gdtoa/strtopf.c, gdtoa/strtopQ.c,
	gdtoa/strtopx.c, gdtoa/strtopxL.c, gdtoa/strtord.c, gdtoa/strtordd.c,
	gdtoa/strtorf.c, gdtoa/strtorQ.c, gdtoa/strtorx.c, gdtoa/strtorxL.c,
	gdtoa/sum.c, gdtoa/ulp.c: Updated with FreeBSD trunk.
	* gdtoa/gd_qnan.h: Added.
	* gdtoa/fpmath.h: Update comments.
	(union IEEEl2bits,mask_nbit_l,LDBL_MANH_SIZE,LDBL_MANL_SIZE,
	LDBL_TO_ARRAY32): Removed.
	* gdtoa/_ldtoa.c: Removed.
	* stdio/vfprintf.c (__vfprintf): Enable call to wcsrtombs.  Disable
	calls to __hldtoa and __ldtoa.
	* wchar/wcsrtombs.c (__wcsrtombs): Rename to wcsrtombs.
	* include/endian.h: Softfloat (non VFP) build means __FLOAT_BIT_ORDER
	being __LITTLE_ENDIAN.  Add case for VFP mode.
	* include/ieee754.h: Update comments.
	(union ieee854_long_double): Remove.
	* Makefile.am (gdtoa/_ldtoa.c): Removed.

Sun Sep 26 20:50:20 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* gcccompat/_b_return.s: Remove __ARM_EABI__ check.
	* gcccompat/_galloca.s: Likewise.
	* gcccompat/galloca.c: Likewise.
	* gcccompat/_eh_support.s: Likewise.
	* gcccompat/_b_frame.s: Likewise.
	* Makefile.am: Don't build gcccompat/* sources for non chunked stack
	builds.
	* include/unixlib/buildoptions.h: Add check on EABI and chunked stack
	combination.  Moved related chunk build options inside a
	__UNIXLIB_CHUNKED_STACK check.

Sun Sep 26 18:59:59 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/bits/sched.h: Fix check on include guard for features.h.
	* include/sys/resource.h: Likewise.
	* include/pwd.h: Likewise.
	* include/sched.h: Likewise.
	* include/pthread.h: Likewise.

Sun Sep 26 18:16:46 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* kernel/kcurskch.s ( _kernel_current_stack_chunk): Return NULL for
	non chunked stack builds.
	* pthread/create.c (__pthread_create): Hacks for non chunked stack
	builds.
	* pthread/newnode.c (__pthread_new_stack): Likewise.
	* pthread/context.c (__pthread_cleanup_idle): Likewise.
	* configure.ac (UNIXLIB_CHUNKED_STACK): New conditional which gets
	set for non arm-unknown-riscos targets.
	(BUILDING_SCL): Rename to UNIXLIB_BUILDING_SCL.
	* include/unixlib/buildoptions.h: Allow _UNIXLIB_* buidoptions to
	be set from the top Makefile.
	(__UNIXLIB_CHUNKED_STACK): Added.
	* Makefile.am: Add __UNIXLIB_CHUNKED_STACK to CFLAGS and CCASFLAGS.
	Follow BUILDING_SCL to UNIXLIB_BUILDING_SCL rename.
	* README-DEV: Add 'Development' section.
	* incl-local/internal/asm_dec.s: Don't define CHUNK_* for non
	chunked stack builds.
	* incl-local/internal/unix.h: Disable sys/stackalloc.c prototypes
	which are not available in non chunked stack builds.
	* sys/stackalloc.c: Have only the __stackalloc_incr_wimpslot
	function for non chunked stack builds.
	* sys/_syslib.s: First attempt at non chunked stack setup.

Sat Sep 11 18:37:46 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/fwrite.c (fwrite): Do not call __flsbuf when fd is -1 as this
	is a magic value.

Thu Sep  9 00:21:32 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dev.c (__fsopen): Give error EISDIR when directory is opened
	for O_RDWR.  Reported by John-Mark Bell.
	* Makefile.am: Removed unexisting sys/netdb.h for install.  Avoid
	creating empty resolv include subdirectory.

Thu Aug 26 03:36:17 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* unix/getenv (__intenv): Move to...
	* unix/pipe.c: ...here.  Changed return type to unsigned int.
	(pipe): Follow return type change.
	* incl-local/internal/unix.h (__intenv): Remove prototype.
	* vscript (__intenv): Remove.
	* unix/getenv.c: Moved remaining part to...
	* unix/ul_getenv.c: ...here.
	* unix/setenv.c (__addenv_to_os): Moved to common/env.c as new file.
	(__remenv_from_os): Likewise.
	(unsetenv): Moved to unix/ul_unsetenv.c.  Tail call __remenv_from_os.
	(clearenv): Moved to unix/ul_clearenv.c.
	Moved remaining part to...
	* unix/ul_setenv.c: ...here.
	* unix/putenv.c: Move to...
	* unix/ul_putenv.c: ...here. Minor cleanup.
	* unix/scl_setenv.c: Added.
	* unix/scl_unsetenv.c: Likewise.
	* unix/scl_putenv.c: Likewise.
	* test/env/basicenvtest.c: Added.

Sun Aug  1 22:43:42 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/sys/time.h (__itimer_which_t): Added for C++ support.
	(getitimer, setitimer): enum __itimer_which -> __itimer_which_t.
	(setitimer): Add __restrict.
	(utimes): Add __nonnull.
	* time/getitmr.c (getitimer): enum __itimer_which -> __itimer_which_t.
	* time/setitmr.c (setitimer): Likewise.

Thu Jul 22 16:16:53 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* unix/custom.c (__unixlib_getdev): Made static.
	(__customstat,__customfstat,__customlstat): Remove.
	Source cleanup.
	* unix/ul_select.c (select): Unconstify.
	* unix/scl_select.c: Add include sys/socket.h.
	* unix/ttyname_r.c: Add include string.h.
	* unix/dev.c: Directly route __customstat/__customfstat/__customlstat
	to __nullstat/__nullfstat/__nullstat.
	* time.time.c: Add include internal/local.h.
	* time/calendconv.c: Likewise.
	* time/ctime_r.c: Likewise.
	* netlib/scl_getservbyport.c (getservbyport): Add cast.
	* scl/scl_fpclassify.s (__fpclassify): Remove S from TEQEQS.
	* common/cvttime.c: Reformat.
	* incl-local/internal/local.h: Remove include internal/fd.h.
	(__open_fn,__open_fh,__close,__reopen): Move prototypes to...
	* incl-local/internal/fd.h: ...here.
	* incl-local/internal/dev.h (__customstat,__customfstat,
	__customlstat): Remove prototypes.
	* incl-local/pthread.h: Add include kernel.h.
	(struct __pthread_thread): Use _kernel_oserror type.
	* sys/errlist.c: Add include stdio.h.

Sat Jul  3 19:20:39 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/sys/socket.h (__SOCKADDR_ARG, __CONST_SOCKADDR_ARG): Add
	temporary workaround for llvm-gcc bug
	(http://llvm.org/bugs/show_bug.cgi?id=7422).

Wed Jun 16 15:17:11 2010  Lee Noar  <leenoar@sky.com>

	* crt/(g)crt0.s(_start): Store pointers to shared library static
	object initialisation/finalisation routines.
	* sys/_syslib.s: Remove the reference to _dl_call_ctors by allowing
	the dynamic loader to pass in the address of a suitable function.
	Call/register dynamic loader supplied shared library init/fini
	functions (if not NULL).
	(__check_stack): Don't rely on caller for PIC register. In the
	shared library, the stack chunk dealloc function and return address
	can and will be higher than application address space so don't use
	them for stack validation.
	* incl-local/internal/asm_dec.s: Rename CRT1_RESERVED1 and
	CRT1_RESERVED2 as CRT1_LIB_INIT and CRT1_LIB_FINI respectively.

Wed Jun  9 00:05:06 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* unix/putenv.c(__addenv_to_env): No need to call __set_errno(ENOMEM)
	after a failed malloc/realloc call.
	* grp/getgroups.c(setgroups): Likewise.
	* common/objattr.c(__object_get_attrs,__object_set_attrs): Likewise.
	* common/symlinks.c(__resolve_symlinks): Likewise.
	* include/unistd.h(lseek64): Consistent declaration like other 64-bit
	variants.
	* unix/reopen.c(__reopen): Minor code cleanup.
	* unix/pipe.c(pipe): Likewise.
	* unix/dup2.c(dup2): Likewise.
	* unix/fchmod.c(fchmod): Likewise.
	* unix/ul_lseek.c(lseek64): Likewise.
	* unix/gethostnam.c(gethostname): Likewise.
	* unix/sync.c(fsync): Likewise.
	* grp/getgroups.c(initgroups): Likewise.
	* grp/getgrnam_r.c(getgrnam_r): Likewise.
	* grp/getgrgid_r.c(getgrgid_r): Likewise.
	* unistd/fchdir.c(fchdir):  Likewise.
	* unistd/fchown.c(fchown): Likewise.
	* pwd/getpwnam_r.c(getpwnam_r): Likewise.

Tue Jun  8 23:26:50 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* configure.ac(AC_OUTPUT): Add test/errno.  Solves bug 207.
	* README-DEV: Added section Testcases.

Sun Jun  6 23:04:35 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* unix/seterr.c(__ul_seterr): Allow to set non-EOPSYS error value
	(helps to eliminate an additional __set_errno call obscuring the
	recorded RISC OS error).
	* kernel/ksetenv.s(_kernel_setenv): Follow __ul_seterr API change.
	* kernel/kswi_c.s(_kernel_swi_c): Likewise.
	* kernel/kosbyte.s(_kernel_osbyte): Likewise.
	* kernel/koscli.s(_kernel_oscli): Likewise.
	* kernel/kosgbpb.s(_kernel_osgbpb): Likewise.
	* kernel/kosbput.s(_kernel_osbput): Likewise.
	* kernel/kosword.s(_kernel_osword): Likewise.
	* kernel/kosfile.s(_kernel_osfile): Likewise.
	* kernel/kosrdch.s(_kernel_osrdch): Likewise.
	* kernel/kosfind.s(_kernel_osfind): Likewise.
	* kernel/kosbget.s(_kernel_osbget): Likewise.
	* kernel/kgetenv.s(_kernel_getenv): Likewise.
	* kernel/kosargs.s(_kernel_osargs): Likewise.
	* kernel/kswi.s(_kernel_swi): Likewise.
	* stdio/rename.c(rename): Likewise.
	* unix/getenv.c(getenv): Likewise.
	* unix/setenv.c(setenv): Likewise.
	* unix/unix.c(convert_command_line): Likewise.
	* unix/dirent.c(newstream,readdir_r): Likewise.
	* unix/truncate.c(truncate): Likewise.
	* unix/chmod.c(chmod): Likewise.
	* unix/unlink.c(unlink): Likewise.
	* unix/getcwd.c(getcwd): Likewise.
	* unix/utime.c(utime): Likewise.
	* unix/fchmod.c(fchmod): Likewise.
	* unix/mkdir.c(mkdir): Likewise.
	* unix/gethostnam.c(gethostname): Likewise.
	* unix/sync.c(sync): Likewise.
	* unix/rmdir.c(rmdir): Likewise.
	* unix/chdir.c(chdir): Likewise.
	* unix/dev.c(__fsopen,__fsclose,__fsread,__fswrite,__fslseek,
	__fsfstat): Likewise.
	* sound/dsp.c(__dspopen,__dspclose,__dspwrite): Likewise.
	* locale/iconv.c(iconv_error,iconv_open): Likewise.
	* netlib/net_error.c(__net_error): Likewise.
	* common/objattr.c(__object_get_attrs,__object_get_lattrs,
	__object_set_attrs): Likewise.
	* common/symlinks.c(read_link_file_info,__resolve_symlinks): Likewise.
	* resolv/scl_gethostbyname.c(gethostbyname): Likewise.
	* sys/exec.c(execve): Likewise.
	* sys/mman.c(munmap,mremap): Likewise.
	* incl-local/errno.h(__set_errno): Reset RISC OS error copy we might
	have.
	* sys/errlist.c(sys_errlist): Fixed typo (last 2 sys_errlist entries
	were wrong).
	(strerror): Only return RISC OS error copy when it is
	marked as valid.
	(strerror_r): Add copy of RISC OS error in given buffer when it is
	valid.
	* scl/chunkid02.s(strerror,__strerror): Rename to __scl_org_strerror
	(as we have our own strerror implementation).
	* stdlib/errno.c(errno): Don't define when __UNIXLIB_ERRNO_THREADED
	is defined.
	* resolv/scl_gethostbyname.c(gethostbyname): Don't assign R0 to ulerrno.
	* unix/unix.c: Minor cleanups.
	* unix/dev.c: Likewise.
	* common/symlinks.c(read_link_file_info,__resolve_symlinks): Likewise.
	* common/sockvalid.c(__socket_valid): Likewise.
	* common/attrib.c(__set_protection,__get_protection): Likewise.
	* pwd/getpw.c(getpw): Likewise.
	* pwd/getpwuid_r.c(getpwduid_r): Likewise.
	* common/fdname.c(__fd_to_name): Don't call __ul_seterr.
	* test/errno/errno.c: Added.

Fri May 28 21:00:46 2010  Lee Noar  <leenoar@sky.com>

	* gcccompat/_eh_support.s(__ehs_return_address,__ehs_stack_limit,
	__ehs_trim_stack): Make sure a processor flag is set for the
	32bit test just in case the module is running a USR mode section
	of code.
	* gcccompat/_b_frame.s(__builtin_frame_address): Likewise.

Fri May 28 20:28:12 2010  Lee Noar  <leenoar@sky.com>

	Fixes for C++ exception handling in SCL module code:

	* gcccompat/_eh_support.s(__ehs_return_address,__ehs_stack_limit,
	__ehs_trim_stack):  A module usually runs in SVC mode which has a
	flat stack (i.e. no chunks), however, some sections of code, for
	example, module start code can run in USR mode. Check the processor
	mode to determine which type of stack we have and process accordingly.
	* gcccompat/_b_frame.s(__builtin_frame_address): Likewise.

Thu May 27 01:03:22 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/asm_dec.s: Make the SUL SWI details available
	for both SCL and UnixLib target builds.

Tue May 25 03:34:56 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* scl/scl_acosf.s(acosf): Added (moved from libscl and converted
	assembler from ObjAsm to GAS syntax).
	* scl/scl_atan2f.s(atan2f): Likewise.
	* scl/scl_atanf.s(atanf): Likewise.
	* scl/scl_ceilf.s(ceilf): Likewise.
	* scl/scl_copysign.s(copysign,copysignl): Likewise.
	* scl/scl_copysignf.s(copysignf): Likewise.
	* scl/scl_cosf.s(cosf): Likewise.
	* scl/scl_coshf.s(coshf): Likewise.
	* scl/scl_expf.s(expf): Likewise.
	* scl/scl_fabsf.s(fabsf): Likewise.
	* scl/scl_floorf.s(floorf): Likewise.
	* scl/scl_hypotf.s(hypotf): Likewise.
	* scl/scl_ldexpf.s(ldexpf): Likewise.
	* scl/scl_log10f.s(log10f): Likewise.
	* scl/scl_logf.s(logf): Likewise.
	* scl/scl_modff.s(modff): Likewise.
	* scl/scl_powf.s(powf): Likewise.
	* scl/scl_signbit.s(__signbit,__signbitf,__signbitl): Likewise.
	* scl/scl_sinf.s(sinf): Likewise.
	* scl/scl_sinhf.s(sinhf): Likewise.
	* scl/scl_tanf.s(tanf): Likewise.
	* scl/scl_tanhf.s(tanhf): Likewise.
	* scl/scl_fpclassify.s(__fpclassify): Added.
	* scl/scl_fpclassifyf.s(__fpclassifyf): Likewise.
	* scl/redirect_setjmp.s(setjmp,longjmp): Type as function.
	* scl/chunkid01.s: Significant cleanup.
	* scl/chunkid02.s: Likewise.
	* scl/chunkid04.s: Likewise.
	* scl/chunkid05.s: Likewise.
	* include/math.h(FP_ZERO,FP_SUBNORMAL,FP_NORMAL,FP_INFINITE,FP_NAN):
	For the SCL target, have the same values as SCL assumes.
	* README: Move 'Building' paragraph to...
	* README-DEV: ...here.  Also added APCS-32 calling conventions section.
	* incl-local/internal/elf-macros.s: Disable errno related macros for
	SCL target.
	* incl-local/internal/scl-macros.s: Add non-SCL target test.  Add FP_*
	SCL values.
	(DefSCLGbl): Removed.
	(DefSCLFncB,DefSCLFncE,DefSCLFncS): Added.
	* sys/_syslib.s(__unixlib_get_fpstatus,__unixlib_set_fpstatus): Remove.
	* include/fpu_control.h: Sync with glibc 2.11 version and adapt it for
	softfloat builds.

Mon May 24 03:28:14 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* scl/chunkid02.s(acosl,asinl,atan2l,atanl,ceill,cosl,expl,floorl,
	log10l,logl,modfl,powl,sinl,tanl,coshl,sinhl,tanhl,frexpl,sqrtl,fabsl,
	fmodl,bcmp): Added.

Sun May 23 23:46:28 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* scl/redirect_setjmp.s: libscl -> scl
	* include/setjmp.h: Likewise.
	* gcccompat/galloca.c: Likewise.
	* incl-local/internal/scl-macros.s: Likewise.

Sun May 23 20:02:32 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	Fix & test case supplied by Jeffrey Lee <me@phlamethrower.co.uk>:
	* gcccompat/galloca.c (__gcc_alloca_restore): Don't restore chunk
	belonging to parent frame.  Solves bug 205.
	* test/alloca: Added test case.

Sun May  2 00:58:38 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* common/riscosify.c: Fix the __TARGET_SOLOADER__ case when build
	option __UNIX_PARANOID is set.

Thu May 13 16:20:41 CEST 2010  John Tytgat  <John.Tytgat@aaug.net>

	* recipe/files/gcc/libunixlib/crt/crt0-scl.s(_start): Merge into __main
	eliminating the latter symbol.
	Removed unnecessary .text lines.
	(c_run): Renamed to __c_run.
	( ___main): Renamed to __main; Register _fini with atexit() after the
	call to _init instead of before so when we have an exit called in
	_init, the _fini is not called.
	(_start,__c_run): Add size info.
	(__gccmain): Added for the module case (being the the equivalent of
	__main for absolute files.

Sun May  9 17:02:23 2010   Lee Noar  <leenoar@sky.com>

	* crt/crt0-scl.s: Fix .type parameter to match function it
	belongs to.

	Fixes for C++ exception handling in SCL (not module code):

	* gcccompat/_b_return.s: Add separate implementation of
	__builtin_return_address for SCL. This differs from the UnixLib
	version in that an SCL stack chunk does not contain a return
	address for when a stack chunk is freed. Instead it creates a
	dummy stack frame to store it.
	* gcccompat/_b_frame.s: Add separate implementation of
	__builtin_frame_address for SCL to help simplify the code.
	* gcccompat/_eh_support.s(__ehs_return_address): The SCL presents
	a problem for __ehs_return_address because it can't know what the
	address of the stack chunk freeing routine is as we do for
	__free_stack_chunk in UnixLib. It needs to be able to test for it
	so that it can substitute the real return address. To overcome this
	a new function, __ehs_init, is called to determine the start and end
	addresses of the SCL. This only needs to be done once - the results
	are saved for future use. If a return address is found to lie within
	the SCL, then it is assumed to be the stack chunk freeing routine.
	Where UnixLib stores the real return address in the stack chunk, the
	SCL creates a dummy frame to store it instead. Because of these
	differences, __ehs_return_address is divided into two separate
	implementations to simplify the code.
	(__ehs_trim_stack): In UnixLib, there is already a __trim_stack function
	we can use to clean up after C++ exception handling. It only requires
	a wrapper to save any registers it may use. For the SCL, we have to
	do the work ourselves, i.e., terminating the stack chain at the current
	chunk and freeing any unused chunks using the SCL supplied routine.
	* incl-local/internal/asm_dec.s: Make CHUNK_OVERHEAD 48 for SCL so that
	512 + CHUNK_OVERHEAD adds up to 560. Remove redundant CHUNK_DEALLOC
	definition.

Tue Apr 20 02:46:32 2010 John Tytgat  <John.Tytgat@aaug.net>

	Merge libscl into libunixlib:
	* configure.ac: Added (generated from gen-auto.pl + added
	BUILDING_SCL conditional); don't enable shared library building when
	configured for SCL building via multilib.
	* {,test/*/}Makefile.am: Added.
	* configure.template: Removed.
	* crt/crt0-scl.s: Moved from libscl/crt to here.
	* ctype/ctypeproc.c: Split into ctype/ctype.c, ctype/isalnum.c,
	ctype/isalpha.c, ctype/isascii.c, ctype/iscntrl.c, ctype/isdigit.c,
	ctype/isgraph.c, ctype/islower., ctype/isprint.c, ctype/ispunct.c,
	ctype/isspace.c, ctype/isupper.c, ctype/isxdigit.c, ctype/toascii.c,
	ctype/_tolower.c, ctype/tolower.c, ctype/_toupper.c, ctype/toupper.c
	* ctype/ctype.c: Removed, contents is at ctypetable.c.
	* locale/ctypetable.c: Move to...
	* ctype/ctypetable.c: ...here.
	* include/ctype.h(__ctype,__ctype_lower,__ctype_upper): Made const
	pointers.
	* stdlib/div.c: Split off ldiv and lldiv into...
	* stdlib/ldiv.c, stdlib/lldiv.c: Added.
	* include/ctype.h: Support SCL.
	(isprint): Fixed.
	* test/ctype: Added test.
	* include/*.h: Merge libscl header contents.
	* ChangeLog-SCL: libscl ChangeLog just before its merge.
	* scl/chunkid02.s(__ignore_signal_handler,__error_signal_marker,
	__default_signal_handler): No longer export these symbols.
	* incl-local/internal/defines.h: Added arch 7 case.
	* scl/chunkid02.s: Define fseeko/ftello.
	* incl-local/internal/scl-macros.s(DefSCLGbl): Added.
	* string/strsignal.c,include/bits/signum.h,signal/signame.c: Enable
	for SCL usage.
	* include/stdint.h(UINT8_MAX,UINT16_MAX,UINT8_C,UINT16_C): Make signed
	instead of unsigned.
	* wchar/wctype.c: Reimplemented and added iswcntrl, iswdigit,
	iswgraph, iswpunct, iswxdigit.
	* include/errno.h,sys/errlist.c: Merge SCL/UL errno codes.
	* unix/dev.c,unix/select.c,unix/fcntl.c: Add include socket.h and
	do minor source cleanup.
	* locale/iconv.c: Enable for SCL usage.
	* stdio/getdelim.c: Likewise
	* incl-local/internal/fd.h: Poison for SCL usage.
	* incl-local/internal/dev.h: Likewise.
	* incl-local/internal/sigstate.h: Likewise.
	* wchar/wcstod.c,wchar/wcstof.c,wchar/wcstol.c,wchar/wcstold.c,
	wchar/wcsxfrm.c: Removed dummy implementations.
	* incl-local/errno.h,signal/_signal.s,signal/post.c(__ul_fp_registers):
	Disable in soft-float builds.
	* signal/_signal.s(_kernel_last_oserror): Move to...
	* kernel/koserror.c: ...here as C implementation.  Invalidate RISC OS
	error block when called.
	* kernel/ksetenv.s,kernel/kosbyte.s,kernel/koscli.s,kernel/kosbput.s,
	kernel/kosgbpb.s,kernel/kosfind.s,kernel/kosargs.s: call __ul_seterr
	with non-zero seterr parameter.
	* signal/_signal.s(__ul_seterr): Move to...
	* unix/seterr.c: ...here as C implementation.  Add support for SCL
	usage.
	* incl-local/pthread.h: Poison for SCL use.
	(pthread::errbuf_valid): Added.
	(__pthread_invalid): Better macro parameter protection.
	* pthread/newnode.c(__pthread_new_node): initialise
	pthread_t::errbuf_valid.
	* test/scl/Makefile.am,test/scl/test-kernel_oserror.c: Add test for
	_kernel_last_oserror code.
	* scl/chunkid01.s(_stub_errorBuffer,_stub_errorNumber): Export.
	* incl-local/internal/os.h(__ul_seterr): Fix parameter typo.
	* include/errno.h(EOPSYS): Added for SCL use.
	* sys/errlist.c(EOPSYS): Likewise.
	* unix/getdomain.c(setdomainname): Move implementation to...
	* unix/setdomain.c: ...here.
	* unix/gethostnam.c(sethostname): Move implementation to...
	* unix/sethostnam.c: ...here.
	* sys/_os.s(__os_word): Remove.
	(_kernel_osword): Move to...
	* kernel/kosword: ...here.  Add call to __ul_seterr when there is an
	error.
	* time/time.c(time): use _kernel_osworld instead of __os_word.
	* time/clk_gettime.c(clock_gettime): Likewise.
	* time/ctime.c(ctime): Reimplement using ctime_r.
	(ctime_r): Move to...
	* time/ctime_r.c: ...here.
	* time/asctime.c(asctime): Reimplement using asctime_r.
	(asctime_r): Move to...
	* time/asctime_r.c: ...here.
	* time/localtime.c(localtime): Reimplement using localtime_r.
	* time/gtime.c(gtime): Reimplement using gmtime_r.
	* time/gmtime_r.c(gmtime_r): Enable for SCL usage.
	* time/localtime_r.c(localtime_r): Likewise.
	* time/ftime(ftime): Likewise.
	* time/tzset(tzet): Likewise.
	* time/dysize.c: Reimplement.
	* time/mktime.c(timelocal): Made strong alias of mktime.
	* include/sys/netdb.h: Remove, was an internal header.
	* include/unistd.h(ttyname_r): Add prototype.
	* unix/open.c(ttyname): Move to...
	* unix/ttyname_r: ...here as ttyname_r.
	* unix/ttyname(ttyname): Added.
	* include/feature.h(__NO_LONG_DOUBLE_MATH): Define it here (instead of
	gen-auto.pl/Makefile.am) as it is used in our public include/math.h.
	* include/resolv.h: Move to...
	* incl-local/resolv.h: ...here and make it fetch include/resolv.h.
	* include/resolv/resolv.h: Move to...
	* include/resolv.h: ...here.
	* stdio/{fdopen.c,fileno.c,fopen.c}: Prefixed with ul_.
	* unix/{close.c,ioctl.c,lseek.c,read.c,readv.c,select.c,write.c,
	writev.c}: Likewise.
	* netlib/{getaddrinfo.c,in6_addr.c,inet_lnaof.c,inet_mkad.c,
	inet_netof.c,inet_netwo.c,inet_ntoa.c,net.c,proto.c,readline.c,
	serv.c,socketpair.c}: Likewise.
	* resolv/*.c: Likewise.
	* stdio/{scl_fdopen.c,scl_fileno}: Added.
	* unix/{scl_close.c,scl_ioctl.c,scl_lseek.c,scl_read.c,scl_readv.c,
	scl_select.c,scl_write.c,scl_writev.c}: Likewise.
	* revolv/scl_gethostbyname.c: Likewise.
	* incl-local/bits/netdb.h: Removed.
	* incl-local/internal/elf-macros.s(NetSWI,NetSWIsimple,NetSWI0,
	NetSWIsimple0): Removed, no longer needed as we're using inline
	assembler now.
	* incl-local/internal/asm_dec.s: Removed socket SWI numbers.
	* incl-local/sys/socket.h: turn socket SWI prototypes into inline
	assembler routines.
	* include/stdio.h(mktemp,mkstemp): Moved prototypes to...
	* include/stdlib.h: ...here.
	* stdio/tmpfile.c(mkstemp): Moved implementation to...
	* stdlib/mkstemp.c: ...here.

Wed Mar 17 00:19:35 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/stdlib.h: Replace 'extern __inline' by '__extern_inline'.
	* include/bits/cmathcalls.h: Likewise.
	* include/bits/wchar.h: Likewise.
	* stdlib/atol.c, stdlib/atoll.c, stdlib/atof.c,	stdlib/atoi.c:
	Reverted previous change (r4509).

Fri Mar 12 01:29:34 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* signal/post.c (__write_backtrace): Revert workaround as llvm bug
	#6552 has been solved.

Tue Mar  9 02:46:33 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* signal/post.c (__write_backtrace): Workaround for llvm bug #6552.

Tue Mar  9 02:42:34 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* gcccompat/_b_return.s, gcccompat/_galloca.s, gcccompat/galloca.c
	gcccompat/_eh_support.s, gcccompat/_b_frame.s: Disable code for
	EABI builds.

Tue Mar  9 02:33:58 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/atol.c(atol), stdlib/atoll.c(atoll), stdlib/atof.c(atof),
	stdlib/atoi.c(atoi): Force no-inline when including stdlib.h
	avoiding redefinition.

Sat Mar  6 15:14:41 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	Give UnixLib its own crt0.s (like other runtime libraries have).

	* crt/crt0.s, crt/gcrt0.s: Added (based on what we had in
	gcc/config/arm/(g)crt1-riscos.asm).
	* gen-auto.pl: Add crt0.s and gcrt0.s to the build.
	* sys/_syslib.s: Update comment.

Sun Feb 28 16:47:11 2010  Lee Noar  <leenoar@sky.com>

	Improve profiling support:

	* unix/unix.c(_exit): Call gmon_machine_cleanup() to perform
	any low-level cleanup, rather than have it called by atexit
	handlers.
	* include/sys/gmon.h: Declare moncontrol function.
	* include/unistd.h: Reactivate declaration of profil function.
	* gmon/_profile.s: New file. Implement low level routines such
	as IRQ handler, wimp filters and handle their installation.
	* gmon/machine-gmon.c: New file. Handle memory management, initialise
	RISC OS specific structures, set up hardware timer, find HAL routines.
	* gmon/profil.c: New file. Implement the profil function.
	* gmon/gmon.c(__moncontrol): Call __profil() as necessary to start or
	stop profiling.
	(__monstartup): Call machine specific function to initialise
	profiling system.
	(__write_profiling,_mcleanup): Write the gmon.out file even if a
	sample overflowed, the results may still be of use.
	* gmon/prof-freq.c(__profile_frequency): Return the frequency of the
	timer.
	* incl-local/internal/machine-gmon.h(_mcount): Fix bug whereby, on a
	26 bit OS, status bits were not cleared from addresses.
	Add RISC OS specific structure and function declarations required
	by the implementation.
	* incl-local/internal/asm_dec.s: Add XOS_Hardware and
	XOS_ClaimProcessorVector.

Sat Feb 27 15:52:45 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl: Fix comment.

Sun Jan 31 15:57:37 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl: Get rid of GCCSDK_SRCDIR.

Thu Jan 21 02:11:44 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/fwrite.c(fwrite): Fix missing case of flushing line buffered
	stream when last byte equals newline.  Bug #189.

Sun Jan 10 18:29:47 2010  Lee Noar  <leenoar@sky.com>

	* sys/_syslib.s: Simplify initialisation code by observing
	that since the call to main() was inlined from unix/unix.c
	to here, __ul_global.main is no longer referenced outside of
	this file. We can eliminate it by using the original pointer
	in the crt1 data block.
	Also, do the same for __ul_global.crt1_flags.
	Remove these entries from __ul_global.
	* incl-local/internal/asm_dec.s: Remove GBL_MAIN and
	GBL_CRT1_FLAGS. Define constants to describe layout of
	crt1 data block.
	* incl-local/internal/unix.h(__ul_global): Remove members
	main and crt1_flags.

Sun Jan 10 18:42:00 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* include/wchar_t(wcscasecmp,wcsncasecmp,wcscoll,wcsxfrm,wcschrnul,
	wcswcs,wcsnlen,wmemmove,wmempcpy,wcstod,wcstof,wcstold,wcstol,wcstoul,
	wcstoll,wcstoull,wcstoq,wcstouq,open_wmemstream,all wide I/O stream
	calls): Disabled prototype as we don't have an implementation for
	those.
	* include/wctype.h(iswblank,wctype,iswctype,wctrans,iswctrans):
	Likewise.
	* wchar/mbrlen.c(__mbrlen): Define.

Sat Jan  9 20:22:18 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/system.c(system): Avoid store which is never going to be
	read.
	* stdlib/msort.c(qsort_r): Likewise.
	* stdio/fpos.c(fseek): Likewise.
	* unix/features.c(env): Likewise.
	* unix/unix.c(__unixinit): Likewise.
	* signal/post.c(post_signal): Likewise.
	* termios/termcap.c(t_tgetnam): Likewise.
	* common/unixify.c(__unixify): Likewise.
	* stdio/popen.c(__pexec): Avoid NULL dereference.
	* unix/dirent.c(scandir): Likewise.
	* pthread/key.c(pthread_key_create): Likewise.
	* common/serial.c(__get_file_ino): Likewise.
	* time/clk_gettime.c(clock_gettime): case CLOCK_REALTIME, tv_nsec is
	no longer garbage.
	* unix/putenv.c(putenv): strncpy() -> memcpy() micro-optimisation.
	* time/stdtime.c(__standard_time): Avoid pointless ptr arithmetic.
	* include/wchar.h: Upgrade with glibc 2.11 version.
	* include/wctypes.h: Likewise.
	* include/sys/cdefs.h: Likewise.
	* include/features.h: Likewise.
	* include/features.h: Likewise.
	* include/bits/wchar.h: Add glibc 2.11 version.
	* include/bits/wordsize.h: Likewise.
	* include/stdio.h(__FILE): Typedef.
	* wchar/mbsinit.c(mbsinit): Follow wchar.h/wctypes.h header changes.
	* wchar/wcwidth.c(wcwidth): Likewise.
	* wchar/wctype.c(towupper,towlower): Likewise.
	* wchar/mbrtowc.c(mbrtowc): Likewise.
	* incl-local/sys/cdefs.h: Follow sys/cdef.h changes.
	* pwd/getpwnam_r.c(getpwnam_r): Avoid 1 line if statements.
	* incl-local/internal/os.h(__ul_seterr): It is allowed to call this
	with NULL argument.

Thu Jan  7 13:47:15 PST 2010  Peter Naulls  <peter@chocky.org>

	* pwd/getpwnam_r.c(getpwnam_r): Return values weren't being properly
	  set in default case.  Rewrite to do what man page says.

Thu Jan  7 21:54:12 2010  Lee Noar  <leenoar@sky.com>

	* Generally:
	Ideally we want to remove the need for pthread_call_every to
	access the task address space in order to validate it and
	decide whether to continue setting the callback or not. Once
	pthread_call_every knows that it has the right task it is free
	to access its variables.
	Previously, the GOT pointer was passed around the interrupt
	functions in r12 and used to access __ul_global to retrieve
	the SUL upcall handler address and r12 value, however, despite
	the WimpPoll filters, this was still prone to crashes in
	pthread_call_every (especially in the shared library).
	To overcome this, a small block of RMA is allocated during
	initialisation containing the SUL upcall handler address, r12
	value and in the case of the shared library, UnixLib's GOT.
	These remain constant throughout the life of the program. A
	pointer to this RMA block is instead passed to the interrupt
	routines, in r12, allowing pthread_call_every safe access to
	the data it needs to make a decision on whether it has the right
	task.

	* Specifically:
	* pthread/_context.s(__pthread_start_ticker): Move filter name
	copy to initialisation function - we only need to do this once,
	and it will reduce RMA fragmentation.
	(pthread_call_every): Use upcall address and r12 value in RMA
	block passed in r12 to determine if we have the correct task.
	Generally ensure pointer to RMA block is passed to interrupt
	routines and change code where necessary to use GOT from RMA
	block.
	* unix/unix.c(_exit): Slightly more work to do when shutting down
	pthreads, so call a function instead.
	* pthread/pthinit.c(__pthread_prog_init): Allocate a small block
	of RMA to hold items of data that remain constant over the life of
	the program. A pointer to this block will be passed to
	pthread_call_every in r12.
	(__pthread_prog_fini): New function to close down pthreads, ie,
	stop timers and free RMA block. Called by _exit as mentioned above.
	* incl-local/internal/unix.h(ul_global): Add pthread_callevery_rma
	member.
	* incl-local/internal/asm_dec.s: Define GBL_PTH_CALLEVERY_RMA.
	* incl-local/pthread.h(__pthread_callevery_block): Declare new
	structure to define layout of RMA block as passed to
	pthread_call_every.
	* sys/_syslib.s(__ul_global): Add pthread_callevery_rma.

Wed Jan  6 00:24:46 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* vscript(__write_backtrace): Export symbol as it is public API.

Sat Jan  2 18:15:54 CET 2010  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/newstream.c(__newstream): Zero reinitialisation is not needed.
	* stdio/putc.c(fputc): Mark we have unflushed data in a line buffered
	stream.
	(putc): Make strong alias of fputc.
	(putc_unlocked): Make strong alias of fputc_unlocked.
	* stdio/flsbuf.c(__flslbbuf): Added.
	(__flsbuf): Constify.
	* stdio/getc.c(getc): Make strong alias of fgetc
	* stdio/stdio.c(__stdioinit): Simplify code by calling setvbuf (and
	have stdout's o_cnt value fixed by this).
	(__stdioexit): Reset __stdin, __stdout, __stderr as the latter can get
	tested for in debug_vsnprintf.
	* stdio/setbuf.c(do_buffer): Don't change any stream fields before
	having done all parameter checks, avoid possible double free for one
	of such cases.
	(setvbuf): Make sure FILE::o_cnt is always number of bytes free in
	buffer.
	* stdio/puts.c(puts): Call fputc() iso putchar() as shortcut.
	* stdio/fwrite.c(fwrite): Flush line buffered streams for any newline
	instead only when the last character is a newline
	* stdio/getc.c(fgetc): Flush all line buffered streams when reading
	from a stream attached to a tty.
	* stdio/filbuf.c(__filbuf, __peek_char): Likewise.
	* stdio/fread.c(fread): Likewise.
	Simplify code, only update FILE::__offset when no error has happened.
	* stdio/fflush.c(fflush): Reset line buffer flush indicator.
	* include/stdio.h(fisatty): Remove declaration, we don't have this
	implemented nor this is a reasonable standard call.
	* incl-local/stdio.h(__flslbbuf): Add declaration.
	* incl-local/internal/unix.h(ul_global::fls_lbstm_on_rd): Added.
	* incl-local/internal/asm_dec.s(GBL_FLS_LBSTM_ON_RD): Likewise.
	* sys/_syslib.s: Likewise.

Fri Jan  1 19:59:01 2010  Lee Noar  <leenoar@sky.com>

	* pthread/_context.s(__pthread_callback): Load PIC
	register directly rather than depending on caller
	to pass it - should be more reliable/stable.
	* pthread/_yield.s(pthread_yield): Fix problem where
	PIC register may contain a GOT that doesn't belong to
	UnixLib causing registers to be dumped where they
	shouldn't be. Also, simplify by using registers for PIC
	code that don't need to be saved/restored.
	* signal/_signal.s(__h_cback): __pthread_callback loads
	the PIC register itself now, so no need to pass it in.

Tue Dec 15 18:18:11 2009  Lee Noar  <leenoar@sky.com>

	* gcccompat/galloca.c: Bug 174 Fix. If GCC determines
	that a call to __gcc_alloca can never be reached, it will
	optimise it away. However, __gcc_alloca_restore is still
	called and crashes because a block was never allocated.
	Fix by exiting if a chunk isn't found.

Thu Nov 26 10:13:45 PST 2009  Peter Naulls  <peter@chocky.org>

	* time/ctime.c, time/stdtime.c, time/asctime.c, include/time.h,
	  incl-local/time.h: Add asctime_r, ctime_r.

Sat Nov 14 10:30:39 PST 2009  Peter Naulls  <peter@chocky.org>

	* string/_strlen.s: Alignment access fix from Adrian
          Lees (Bug #173).

Wed Oct 21 17:46:48 2009  Lee Noar  <leenoar@sky.com>

	* incl-local/internal/unix.h(struct __process): Add
	2 new flags to record how this process was created.
	* sys/exec.c(execve): Set flag to show that this
	process was the result of exec().
	* sys/vfork.c(__fork_post): Set flag to show that this
	process was the result of fork().
	* unix/unix.c(_exit): Be more careful about when we
	deregister the client from the Shared Object Manager.
	A process that was forked (but not execed) is
	considered to be the same client as its parent. It
	should not be deregistered on exit, so that control can
	be successfully returned to the parent.
	A process that was execed (even if forked) is a new client
	in its own right and distinct from its parent and should
	be deregistered on exit.
	A process with no parent should always be deregistered.

Sat Sep 19 12:41:12 2009  Lee Noar  <leenoar@sky.com>

	* gmon/gmon_start.c: Don't use _init symbol to find the
	start of the text segment as this creates a bogus
	DT_INIT entry in the dynamic segment. Instead use the
	linker generated __text_start.

Mon Aug 24 10:41:22 PDT 2009  Peter Naulls  <peter@chocky.org>

	* signal/post.c: Skip over # at start of C++ symbol names
        for demangling.
	* sys/_syslib.s: Typo fix.
	* pthread/_yield.s: Register handling safety from John Tytgat.
        * debug/dvsprintf.c: Use stdio for __os_printf after stdio
        is initialised, otherwise Wimp debugging can become very
        difficult.

Thu Aug 20 00:44:36 CEST 2009  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/pthread.h(__pthread_saved_context): don't define fpregs
	and fpstatus in softfloat builds.

Sun Aug 16 12:58:06 PDT 2009   Peter Naulls  <peter@chocky.org>

	* sys/mman.c: Simplistic mmap file handling. Only supports reading
        from a zero offset, but this covers much of its use.

Sun Aug  9 01:15:13 CEST 2009  John Tytgat  <John.Tytgat@aaug.net>

	* netlib/getnameinfo.c: Removed, we have another implementation in
	netlib/getaddrinfo.c.

Sun Aug  2 07:44:06 PDT 2009  Peter Naulls  <peter@chocky.org>

	* sys/errlist.c: Add entry for EOVERFLOW.
	* libm-dbl64/s_finite.c, libm-dbl64/s_isinf.c, libm-dbl64/s_isnan.c,
          libm-flt32/s_isinff.c, libm-flt32/s_finitef.c libm-flt32/s_isnanf.c:
	Remove hidden_def, since it seems to serve no purpose, and
        causes linking errors.

Fri Jul 31 14:20:29 PDT 2009  Peter Naulls  <peter@chocky.org>

	* include/errno.h: Add EOVERFLOW.  Not used by UnixLib,
          but sometimes returned by library routines.

Thu Jul 16 17:29:12 2009  Lee Noar  <leenoar@sky.com>

	* Generally:
	Implement very simple profiling. Only function call
	counting is supported, there is no timing. Only really
	effective on statically linked code. Some of this
	code is imported and adapted from glibc.

	* Specifically:
	* include/sys/gmon.h: New file. Standard header for
	profiling support.
	* include/sys/gmon_out.h: Likewise.
	* gmon/gmon.c: New file. Support routines for profiling.
	* gmon/prof-freq.c: New file. Stub implementation of
	__profile_frequency().
	* gmon/mcount.c: New file. Simple mcount implementation
	that counts function calls and records their relationships.
	* gmon/gmon-start.c: New file. Code called at program startup
	to start profiling. Also registers function with atexit to
	write results to file.
	* incl-local/internal/machine-gmon.h: New file. mcount
	machine code stub that saves any registers that real mcount
	code would otherwise corrupt.
	* incl-local/internal/unix.h(ul_global): Add word to record
	flags passed by (g)crt1-riscos.o.
	* incl-local/internal/asm_dec.s: Add constant for above.
	* incl-local/sys/cdefs.h: Define some of the symbol attribute
	macros.
	* sys/_syslib.s(__main): Call __gmon_start__ if profiling is
	enabled.

Fri Jul 03 19:42:48 2009  Lee Noar  <leenoar@sky.com>

	* sys/exec.c(execve): Only deregister the client from the
	Shared Object Manager if we are not the parent of another
	process. If the client is a parent, then it must remain
	registered so that the child can return.
	Also don't bother about accessing global variables after
	deregistering. Examination of the compiled code shows that
	despite attempts to ensure that this doesn't happen, the
	compiler still generates accesses to global variables after
	deregistering without any ill effects. In fact, there should
	be no ill effects as the PIC register and R/W data segment are
	still valid and are not under the control of the Shared
	Object Manager.

Mon Jun 22 19:23:05 2009  Lee Noar  <leenoar@sky.com>

	* gcccompat/_eh_support.s: Add PIC instructions.
	* gcccompat/_b_return.s: Likewise.

Sun Jun 14 14:46:12 2009  Lee Noar  <leenoar@sky.com>

	* gcccompat/_eh_support.s:
	* (__ehs_stack_limit): New function.
	Given a stack pointer (which will not be the current one),
	determine which stack chunk contains it and return the stack
	limit for that chunk. Used by uw_install_context() in
	unwind-dw2.c (call frame exception handling). The stack
	unwinder steps through the call frames looking for either
	cleanup handlers or exception handlers. The context is installed
	once one of these is found, however, the frame that is jumped
	to may be within a different stack chunk so we have to restore
	the stack limit for that chunk.
	* (__ehs_trim_stack): New function.
	Wrapper for __trim_stack to preserve any registers that it may
	use/corrupt. If the stack unwinder unwinds down the call frames
	to a different stack chunk, then there will be one or more
	redundant chunks that need to be freed.

Sun Jun 7 11:10:43 2009  Lee Noar  <leenoar@sky.com>

	* General overview:
	The call frame C++ exception handling code creates a table of
	call frames that relate to the frames on the stack. This table
	allows the stack unwinder to maintain a context that stores
	the locations of all registers stored by the current function
	on entry.
	The return address of a function is used as a key to allow the
	stack unwinder to find its particular entry in the table. If the
	wrong return address is used, then exception handling will fail
	usually with a crash in the personality routine. The personality
	routine (for C++ at least) attempts to write to r0 and r1 in the
	stack frame. These registers aren't usually saved on function
	entry, only a few exception handling functions actually save
	these registers.
	Wesnoth is an example of where these crashes have been observed.

	* Specifically:
	* gcccompat/_b_frame.s(__builtin_frame_address): I have found
	that __builtin_frame_address can return the wrong result under
	certain circumstances, e.g., when the requested fp is not within
	the current stack chunk. This causes __builtin_return_address to
	give the wrong return address and crashes in C++ exception
	handling as detailed above. The problem seems to be that the
	behaviour of the SCL is slightly different to UnixLib when the
	stack is extended. UnixLib creates a new chunk and starts using
	that as the stack, but the comment in the code suggests that SCL
	copies a frame as well. I believe that this makes the chain of
	frames slightly different for UnixLib and SCL. These changes
	simplify the UnixLib code to match the stack extension code, but
	leave the SCL code as is, as I have no reason to believe that it
	is wrong in this case.
	* gcccompat/_b_return.s(__builtin_return_address): UnixLib code
	attempts to load the return address from the stack chunk which is
	addressed by a2. However, at this point, a2 will either contain a
	frame address or have been corrupted by the call to
	__gcc_alloca_return_address() leading to crashes in exception
	handling as detailed above.
	Set a2 to contain the address of the current stack chunk. Note
	that using the chunk that actually contains the requested fp
	doesn't work as far as exception handling is concerned.
	* gcccompat/_eh_support.s(__ehs_return_address): New file, new
	function. The context maintained by the exception handling code,
	as detailed above, is initialised from the call frame table using
	a return address obtained via __builtin_return_address(). This
	correctly handles the case whereby the return address may be
	__free_stack_chunk or __gcc_alloca_free. However, further updates
	to the context by the stack unwinder retrieve the return address
	directly from the stack. If the return address happens to be one
	of these functions, then exception handling will fail.
	__ehs_return_address() does a similar job to
	__builtin_return_address() in that it traps these special functions
	and returns the correct result. It differs in that we already know
	the frame address (which will not be the current one) and are able
	to pass it as an argument.

Wed May 27 20:31:18 PDT 2009  Peter Naulls  <peter@chocky.org>

	* sys/byteorder.h: Fix bogus include.  Seems to have been wrong
	for a long time.

Sat May 23 15:29:42 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* unix/getenv.c(__last_environ): Removed, is now
	__ul_global.last_environ.
	* incl-local/internal/unix.h(struct ul_global): Replaced __notused5
	by last_environ field, always have a main function pointer.
	(_main): Removed prototype, no longer exists.
	* unix/setenv.c(unsetenv): Micro optimisation.
	(clearenv): Make use of last_environ from __ul_global.
	* unix/putenv.c(__addenv_to_env): Likewise.
	* unix/unix.c(_main, main prototype): Remove, equivalent code got
	added to __main.
	* incl-local/internal/asm_dec.s(PROC_ARGC,PROC_ARGV): Added.
	(GBL_*): Fixes up some recently allocated entries.
	(GBL_LASTENVIRON): Added.
	* sys/_syslib.s(__main): Instead of calling _main, call user
	supplied main routine directly.
	(main): Have it always defined.
	* vscript(__last_environ): Removed.
	* local/ctypetable.c(__build_ctype_tables): Fix comment.
	* test/env/testenv.c: Dump environ.

Thu May 21 18:58:32 2009  Lee Noar  <leenoar@sky.com>

	* sys/exec.c(execve): Deregister the current client from the
	Shared Object Manager before passing control to the new
	process. Fix for bug 171.

Mon May 11 23:31:29 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* include/bits/posix_opt.h(_POSIX_TIMEOUTS): Disabled as we don't
	have pthread_mutex_timedlock.

Sat Mar 28 14:36:21 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* include/kernel.h: Constify _kernel_osfind name parameter;
	'unsigned' -> 'unsigned int'.
	* scl/_kosfind.s: Update comments.
	* sys/mman.c: White space change.

Sat Mar 28 11:30:10 2009  Lee Noar  <leenoar@sky.com>

	* signal/_signal.s(__h_error): Make sure a valid signal number
	is passed to __unixlib_raise_signal() when __SOFTFP__ is defined.
	Previously, for example, instead of seeing a branch through zero
	error, you would get a recursive signal because the signal handler
	itself would cause a memory violation due to a2 containing a
	pointer instead of an array index.

Sun Jan 18 19:45:02 2009  Lee Noar  <leenoar@sky.com>

	* incl-local/internal/unix.h(__funcall): In the shared library,
	function addresses can and will exist outside application space,
	so don't test against appspace_himem.
	* unixlib/buildoptions.h: Remove comment.

Sun Jan 18 16:57:12 2009  Lee Noar  <leenoar@sky.com>

	* Generally:
	Implement lstat so that symlinks can be probed. Fix for
	bug(feature request) #162 item 1.

	stat() - Always follow symlinks and return info on target object.
	lstat() - Do not follow symlinks, and return info on given
	object even if symlink. As per Linux, if a symlink is lstat()ed,
	S_IFLNK = TRUE, S_IFREG = FALSE.

	* Specifically:
	* unix/custom.c: Add __customlstat().
	* unix/lstat.c(lstat,lstat64): Call new implementation instead
	of stat().
	* unix/dev.c: Add __fslstat() and ensure all devices have a
	suitable lstat entry.
	* common/objattr.c(__object_get_lattrs): New function similar
	to __object_get_attrs() except symlinks are not followed. Allows
	the file info of the symlink itself to be found.
	* common/symlinks.c: Move macro definitions of constants...
	* incl-local/internal/symlinks.h: ...to here.
	* incl-local/internal/local.h: Add declaration of
	__object_get_lattrs().
	* incl-local/internal/dev.h: Add lstat entry to struct dev.
	Add declarations for __fslstat() and __customlstat().
	* incl-local/internal/unix.h: Instead of declaring
	__resolve_symlinks() directly, include symlinks.h.

Sat Jan 17 20:10:49 2009  Lee Noar  <leenoar@sky.com>

	* common/objattr.c(__object_set_attrs): Fix typo that would lead
	to a memory leak.

Sat Jan 17 18:22:26 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c(convert_command_line): Reverting r1904 change
	(Fri Mar 10 21:25:47 2006) and canonicalise using Run$Path; When
	result of canonicalisation is non-existing, use given argv[0] as
	input for unixify; Made	common fatal exit point; void return instead
	of unused int return.

Sat Jan 17 15:53:04 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* include/kernel.h: Add 'int' to 'unsigned'.
	* README(Building): Updated.

Fri Jan 16 02:53:30 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	*  unix/features.c(__get_program_name): A colum character can mark the
	start of a leafname as well.  Solves Bugzilla #169 (reported by John
	Kortink).

Sat Jan  3 21:03:34 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* ChangeLog: Updated John-Mark Bell's e-mail address.

Fri Jan  2 03:23:07 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* module/sul.s: Update module title with "(debug)" string when
	DEBUG_PROC_MATCHING has been defined.

-----------------------------------------------------------------------
[ UnixLib v5.0 ]

Fri Jan  2 03:09:47 CET 2009  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/msort.c: Fixed wrong __mempcpy emulation (when result gets
	written back to first __mempcpy argument).

Tue Dec 23 02:25:46 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* test/env/testenv.c: Added test for inheritance of environment
	variables from parent to child process and when changes from
	Unix environment variables need to result in updated RISC OS
	system variables.  Based on a test program written and posted
	in ML by Peter Naulls.

Sat Dec 20 14:34:20 CET 2008  Theo Markettos <theo@markettos.org.uk>

	* grp/getgrouplist.c(getgrouplist): Added.
	* test/grp/getgrouplist.c,test/grp/test.group: Added test application
	for getgrouplist code.
	* include/grp.h(getgrouplist): Added prototype.

Thu Dec 18 22:57:28 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* unix/syslog.c(vsyslog): More sensible mapping between Unix and
	RISC OS syslog priorities.

Thu Dec 18 22:23:52 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/msort.c: Copy from glibc 2.9 which has a much better qsort
	implementation.  Number of compares done in testsort2.c dropped from
	1849086/1534480/834012928/627343953 to 1536347/815024/853904/1209216.
	* stdlib/memcopy.h: Added, also from glibc 2.9.
	* stdlib/qsort.c: Removed.
	* test/stdlib/testsort2.c: Added.

Mon Dec 15 05:08:52 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* unix/features.c(features): Implement coredump feature.
	* signal/post.c(__write_backtrace): Mark as pthread unsafe.
	(post_signal): Move FPE reg dump code to __write_backtrace; call
	__unixlib_write_coredump when action is 'core'.
	* include/unixlib/local.h(__unixlib_write_coredump,__write_backtrack):
	Make public.
	* vscript(__backtrace_getfp): Remove, this routine no longer exists.
	* README: Document 'coredump' feature.
	* incl-local/internal/sigstate.h(__init_coredump): Add prototype.
	* incl-local/internal/swiparams.h(OSFILE_SAVEBLOCK_LOADNEXEC,
	OSFILE_SAVEBLOCK_FILETYPE): Define.
	* sys/_os.s(__os_file): Don't change a3 when it was 0 on entry.
	* sys/mman.c(__init_coredump): Define coredump directory.
	(__unixlib_write_coredump): Write coredump files (application space
	and all DAs).

Tue Dec  2 02:36:59 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* test/pthread/fork.c(__UNIXLIB_INTERNALS): Remove usage as it is no
	longer needed.
	* include/complex.h: Likewise.
	* include/features.h: Likewise.
	* include/math.h: Likewise.
	* include/sys/cdefs.h: Likewise.
	* incl-local/internal/fd.h: Likewise.
	* incl-local/internal/os.h: Likewise.
	* incl-local/internal/unix.h: Likewise.
	* incl-local/internal/swiparams.h: Likewise.
	* gen-auto.pl(AM_CFLAGS): Remove __UNIXLIB_INTERNALS definition and
	add __GNU_LIBRARY__ and __NO_LONG_DOUBLE_MATH definitions.

Fri Oct 24 02:07:18 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* string/strdup.c(strdup): renamed strdup to __strdup and
	provided weak alias strdup instead.

Mon Oct 13 02:34:22 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* pthread/_exit.s(__pthread_exit): Simplify code.

Mon Oct 13 02:19:00 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl: Fix typo.

Tue Sep  9 19:29:39 PDT 2008  Peter Naulls  <peter@chocky.org>

	* pthread/cond.c(pthread_cond_timedwait): Fix divisor.
	Timeout is in centiseconds, not milliseconds.

Tue Sep  9 20:49:05 2008  Lee Noar  <leenoar@sky.com>

	* signal/post.c(sigsetup): Don't use the address range of the
	application to validate the location of the signal handler when
	compiling for the shared library.

Thu Aug 28 20:27:45 2008  Lee Noar  <leenoar@sky.com>

	* pthread/_yields.s(pthread_yield): The current implementation
	uses a single STMDB instruction to store all relevant registers
	to __cbreg including two banked registers. Under certain
	circumstances, this can trigger a bug in revision K StrongARM
	CPUs whereby the banked register r14 is not saved. To overcome
	the bug, split the instruction into two STMs so that the banked
	registers are saved independently of the others.

Mon Aug 11 20:38:14 2008  Lee Noar  <leenoar@sky.com>

	* signal/_signal.s(__h_cback): Make sure __pthread_callback
	is called with r7 containing the UnixLib GOT pointer as it
	expects.

Wed Aug  6 20:34:09 2008  Lee Noar  <leenoar@sky.com>

	* pthread/cancel.c: Add dummy function that is never called or
	referenced. Its only purpose is to ensure that several pthread
	functions that are made weak in libstdc++ are pulled in by the
	static linker which otherwise would resolve to NULL. This only
	effects statically linked C++ binaries.

Sun Jul  6 17:12:39 PDT 2008  Peter Naulls  <peter@chocky.org>

	* common/riscosify.c: Add defines for a cut-down version of
	__riscosify for the benefit libdl, which only needs to handle a single
	case.  This doesn't change the behaviour of the code for UnixLib or
	SCL.

Fri Jun 13 01:33:48 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* include/bits/netdb.h(_sclose,_sread,_swrite,_sioctl): Move internal
	swi veneers to...
	* incl-local/bits/netdb.h: ...here.
	* include/sys/stat.h(__stat): Move to...
	* incl-local/sys/stat.h: ...here.
	* include/sys/select.h(_select): Move to...
	* incl-local/sys/select.h: ...here.
	* include/sys/cdefs.h(_strong_alias,weak_function,weak_const_function,
	weak_alias,_weak_alias,hidden_def,libm_hidden_def,INTDEF,
	internal_function): Move to...
	* incl-local/sys/cdefs.h: ...here.
	* include/sys/debug.h: Moved file to...
	* incl-local/sys/debug.h: ...here.
	(debug_printf): Added printf attribute for better type checking.
	* include/sys/socket.h(_socket,_bind,_listen,_accept,_connect,_recv,
	_recvfrom,_recvmsg,_send,_sendto,_sendmsg,_shutdown,_setsockopt,
	_getsockopt,_getsockname,_getpeername,__opensock): Move to...
	* incl-local/sys/socket.h: ...here.
	Upgraded to glibc 2.7 version.
	* string/strchr.c(index): Make index strong alias of strchr.
	* string/strrchr.c(rindex): Make rindex strong alias of strrchr.
	* string/index.c(index,rindex): Removed.
	* string/stricmp.c(strcasecmp): Make strcasecmp strong alias of
	stricmp.
	* string/strnicmp.c(strncasecmp): Make strncasecmp strong alias of
	strnicmp.
	* string/memcmp.c(bcmp): Make bcmp strong alias of memcmp.
	* string/memrchr.c: Go for original glibc 2.7 version.
	* string/strchrnul.c: Likewise.

Fri May 16 01:43:59 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* common/symlinks.c(__resolve_symlinks): avoid writing to NULL.

Tue May 13 21:07:51 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dev.c(__fsopen): Call __riscosify only once as the result of
	__resolve_symlinks is guaranteed to be already a RISC OS filename.
	* common/symlinks.c(__resolve_symlinks): avoid malloc/free sequence
	unless it is really necessary and reuse previously claimed buffer when
	possible; Made code a little bit more compact; Added comments.

Thu May  1 20:08:23 PDT 2008  Peter Naulls  <peter@chocky.org>

	* pthread/lock.c: Fix logic from earlier tidy.

Wed Apr 23 22:23:03 PDT 2008  Peter Naulls  <peter@chocky.org>

	* unix/custom.c, include/unixlib/local.h: New function to
	  allow opaque setting of custom select() function.

Sun Apr  6 01:47:47 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* include/pthread.h(struct __pthread_thread,
	__pthread_running_thread): Move to...
	* incl-local/pthread.h: ...here.
	* string/strsignal.c: Added include pthread.h.

Sat Apr  5 22:01:57 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/fopen.c(fopen): Added comment.
	* unix/dev.c(__fsopen): When opening a directory, make sure we're
	using the original filename and not the riscosified one.  Solves
	bug #163 logged by Duncan Moore <duncan.m00re@btinternet.com>.

Sat Apr  5 17:58:01 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* time/_clock.s: Use NAME/DECLARE_FUNCTION macros.
	* string/_strcpy.s: Likewise.
	* string/_memcpy.s: Likewise.
	* string/_strlen.s: Likewise.
	* string/_memset.s: Likewise.

Sat Apr  5 17:07:58 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* include/features.h: Move UnixLib internal definitions to...
	* incl-local/features.h: ...here.
	* include/dirent.h,incl-local/dirent.h: Likewise.
	* include/time.h,incl-local/time.h: Likewise.
	* include/locale.h,incl-local/locale.h: Likewise.
	* include/setjmp.h,incl-local/setjmp.h: Likewise.
	* include/pwd.h,incl-local/pwd.h: Likewise.
	* include/stdlib.h,incl-local/stdlib.h: Likewise.
	* include/stdio.h,incl-local/stdio.h: Likewise.
	* include/pthread.h,incl-local/pthread.h: Likewise.
	* include/grp.h,incl-local/grp.h: Likewise.
	* include/unistd.h,incl-local/unistd.h: Likewise.
	* include/signal.h,incl-local/signal.h: Likewise.
	* include/errno.h,incl-local/errno.h: Likewise.
	* incl-local/internal/unix.h( __addenv_to_os): Add prototype.

Wed Apr  2 00:36:38 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* common/riscosify.c(riscosify): Avoid discname when specified gets
	changed and when no discname is specified, make sure we output a '$'.
	* test/filename/testriscosify.c: Added new cases.

Tue Apr  1 00:23:32 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* include/unixlib/asm_dec.s: Moved to...
	* incl-local/internal/asm_dec.s: ...here.
	* include/unixlib/dev.h: Moved to...
	* incl-local/internal/dev.h: ...here.
	* include/unixlib/fd.h: Moved to...
	* incl-local/internal/fd.h: ...here.
	* include/unixlib/os.h: Moved to...
	* incl-local/internal/os.h: ...here.
	* include/unixlib/types.h: Moved to...
	* incl-local/internal/types.h: ...here.
	* include/unixlib/unix.h: Moved to...
	* incl-local/internal/unix.h: ...here.
	* include/unixlib/local.h: Moved __UNIXLIB_INTERNALS marked
	declarations to...
	* incl-local/internal/local.h: ...here.
	* Updated lots and lots of c/h/s files to follow above changes.

Sun Mar 30 15:59:15 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dev.c: Added a bit more debug info and did some
	microoptimisation.
	* unix/tty.c(__ttyicanon): 0 -> NULL
	* debug/debug.c(__debug): Added a bit more debug info.

Sun Mar 30 15:33:22 CEST 2008  John Tytgat  <John.Tytgat@aaug.net>

	* test/process-redirect/{child.c,Makefile,parent.c,RunTestQueue,feb}:
	Added test suite used to test the recent redirection/pipe/dup fixes.

Sat Mar 29 18:48:49 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* unix/fcntl.c(fcntl): Case F_DUPFD needs file descriptors to be
	copied too otherwise we would be closing OS_ChangeRedirection acquired
	RISC OS handles (FILE_HANDLE_FROM_OS).  And FILE_ISDIR bit also needs
	to be copied.
	* include/unixlib/unix.h(struct ul_global): Renamed __unused1,
	__unused4 and __unused2 to rewindpipeoffset, changeredir0 and
	changeredir1.
	* sys/_syslib.s: Likewise.
	* sys/vfork.c(__fork_pre): initialise rewindpipeoffset, changeredir0
	and changeredir1; (__fork_post): restore read pipe file offset and
	RISC OS redirection.
	* sys/exec.c(execve): when in a fork context set RISC OS redirection
	based on file descriptors 0 and 1 when those are real files or a pipe.
	Also record the read pipe offset for file descriptor 1 as
	rewindpipeoffset and move file offset to the end. Any non-UL process
	(e.g. libscl, OS command) can now read/write data using file handles
	managed by parent.

Thu Mar 27 02:24:59 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* vscript(_Exit,__exit,__exit_no_code,__exit_with_error_block):
	Deleted (_Exit is a valid C99 symbol and the others were not defined)

Fri Mar 21 19:37:54 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* include/time.h(__tz): Remove declaration.
	* time/tzset.c(tzset): One maximum byte less copied.
	(__tz): Moved to...
	* time/calendconv.c: ...here.
	(__calendar_convert): Use static __tz data when parameter tz is NULL.
	* time/localtime.c(localtime): Use tz = NULL for __calendar_convert;
	call tzset() to initialise timezone and daylight.
	* time/localtime_r.c(localtime_r): Call tzset() to initialise timezone
	and daylight.
	* time/gmtime.c(gmtime): Use tz = NULL for __calendar_convert.
	* time/asctime.c(asctime): One byte trimming.
	* time/gettod.c(gettimeofday): Simplified code for tz != NULL.
	* time/mktime.c(mktime): calculated tm_wday and tm_yday fields were
	one off.
	* time/clk_gettime.c(clock_gettime): case CLOCK_REALTIME: use uint64_t
	based calculation which now gives correct result; case
	CLOCK_MONOTONIC: calculated tv_nsec field was 100 times too big.

Fri Mar 21 13:26:13 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* serial/common.c(__get_file_ino): combining directory and filename
	should be done with a Unix directory separator, not RISC OS one;
	some variable shuffling resulting in dropping a nasty cast.

Fri Mar 21 05:34:43 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/printf.c: Cosmetic reformat.
	* stdio/asprintf.c: Likewise.
	* include/stdio.h(clearerr_unlocked): Declare.
	* stdio/clearerr.c(clearerr_unlocked): Implement as alias to clearerr.
	* include/dirent.h(DIR): Add fd entry.
	(dirfd): Declare.
	* unix/dirfd.c(dirfd): Implemention based on lazy fd allocation.
	* unix/dirent.c(newstream): Initialize fd to -1.
	(closedir): close fd when allocated.

Mon Mar 17 03:31:08 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/stdio_ext.h: Moved to...
	* include/stdio_ext.h: ...here and changed contents with a glibc
	version with everything disabled except the __fpurge prototype.

Thu Feb 28 00:58:23 CET 2008  John Tytgat  <John.Tytgat@aaug.net>

	* README: Added comment on Wimp_StartTask usage in threaded programs.
	Updated description on build options.

Sat Feb 16 07:05:37 PST 2008  Peter Naulls  <peter@chocky.org>

	* include/stdio.h, stdio/putc.c: Change putc_unlocked to a
	declaration. This works better with some code that gets confused when
	it's a #define.
	* unix/setenv.c, unix/putenv.c: Make putenv works as advertised for
	setenv when handling RISC OS native variables as documented in the
	README.

Tue Jan 29 22:46:43 PST 2008  Peter Naulls  <peter@chocky.org>

	* unix/statfs.c, include/sys/vfs.h, include/statfs.h: Dummy
	statfs implementation.

Sun Jan 27 19:29:25 PST 2008  Peter Naulls  <peter@chocky.org>

	* stdio/fpurge.c, include/stdio.h: Added hopefully correct fpurge
	implementation.

Mon Dec 31 17:10:15 2007  Lee Noar  <leenoar@sky.com>

	* sys/_syslib.s: Force word alignment of bss area. If we don't and
	a bss section whose size is not a multiple of 4 is merged before this one,
	then it will be misaligned.
	* sys/_vfork.s: Likewise.

Thu Dec 27 04:47:04 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* sys/_jmp.s (setjmp): Previous change introduced wrong GOT handling
	for shared library support.

Sun Dec 23 17:36:16 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* string/basename.c: Added version from glibc 2.7.
	* include/string.h (basename): Added prototype.

Sat Dec  1 05:51:17 CET 2007  Peter Naulls  <peter@chocky.org>

	* unix/unix.c: Fixed typo.

Sun Nov 25 11:36:06 PST 2007  Peter Naulls  <peter@chocky.org>

	* include/swis.h: Massive number of missing SWIs. Thanks to Rob F. Johnson.
	* unix/stat.c: Add missing stat64 function - just call stat.

Sun Nov 18 02:40:16 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* debug/dvsprintf.c: Synced with the latest Linux version.
	* stdio/freopen.c, stdio/newstream.c, stdio/flsbuf.c, stdio/fwrite.c,
	stdio/fopen.c, stdio/fpos.c, stdio/fclose.c, stdio/popen.c,
	unix/open.c, unix/close.c, unix/stat.c, unix/features.c,
	unix/select.c, unix/unix.c, unix/dirent.c, unix/dev.c,
	unix/putenv.c, unix/getenv.c, unix/write.c, pthread/create.c,
	pthread/exit.c, pthread/pthinit.c, pthread/newnode.c,
	pthread/context.c, signal/sleep.c, signal/sigprocmsk.c,
	signal/sigsuspend.c, signal/post.c, common/riscosify.c,
	common/funcallerr.c, sys/brk.c, sys/stackalloc.c, sys/exec.c,
	sys/execvp.c: Make use of debug_printf.

Sat Nov 10 18:06:26 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* common/riscosify.c: Use GNU code style
	(__sfixfind): Changed while() into for()
	(riscosify): Do the test on non-__RISCOSIFY_MASK bits only when
	configured for __UNIXLIB_PARANOID and use assert() for this.

Thu Oct 25 16:49:23 2007  Lee Noar  <leenoar@sky.com>

	* gcccompat/_b_return.s: Poke function name to aid debugging.
	* gcccompat/_galloca.s: Likewise.
	* gcccompat/_b_frame.s: Likewise.
	* sys/_syslib.s: In the DSO, call Dynamic Loader function
	_dl_call_ctors() to call all shared library _init functions.

Tue Oct 16 01:55:08 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* module/sul.s(sul_exec): finetune previous change by canonicalising
	given exec parameter using Run$Path and verifying if result is an
	existing file.  If not, fall back on original given parameter.

Sat Oct  6 22:24:36 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	Due to the large number of files where following changes were made, we
	won't mention them all explicitly.
	* __set_errno: use it more consistently to set errno value and return
	-1.
	* __ul_seterr: likewise.
	* IGNORE(): removed.
	* Include unixlib/unix.h to get access to private UnixLib variables.
	* Reduction of the export of private variables by referencing them
	via __ul_global.
	* Updated comments.
	* dsp_exit: renamed to __dsp_exit.
	* scl/_ksetenv.s(_kernel_setenv): declare as function.
	* scl/_kswi_c.s(_kernel_swi_c): likewise.
	* scl/_kernel.s(_kernel_swi): likewise.
	* scl/_kosbyte.s(_kernel_osbyte): likewise.
	* scl/_koscli.s(_kernel_oscli): likewise.
	* scl/_kosbput.s(_kernel_osbput): likewise; call __ul_set_err in case
	of a RISC OS error.
	* scl/_kosgbpb.s(_kernel_osgbpb): likewise.
	* scl/_kosfile.s(_kernel_osfile): likewise.
	* scl/_kosfind.s(_kernel_osfind): likewise.
	* scl/_kosrdch.s(_kernel_osrdch): likewise.
	* scl/_kosbget.s(_kernel_osbget): likewise.
	* scl/_kgetenv.s(_kernel_getenv): likewise.
	* scl/_kosargs.s(_kernel_osargs): likewise.
	* scl/_kcurskch.s(_kernel_current_stack_chunk): likewise.
	* include/assert.h(assert): removed noreturn attribute.
	* module/sul.s(DEBUG_PROC_MATCHING): added debug output during
	sul_exec and sul_fork;
	(PROC_FORK_STORAGE): reserved 10*4 + 4*12 instead of 11*4 + 4*12
	bytes.
	(swi_handler): turned into branch table.
	(swi_value): reduced the number of different registers used.
	(swi_count): likewise.
	(sul_wimpslot): likewise.
	(swi_initialise): strip off the FS of OS_GetEnv argv[0] as well the
	executable given to sul_exec().
	(sul_fork): FP register f4-f7 were not restored.
	(sul_exec): canonicalise exec filename so that we can inherit process
	structures more reliably at swi_initialise; FP registers f4-f7 were
	wrongly restored when returning to a parent process.
	* common/_taskhandle.s(__get_task_handle): used to request taskhandle
	from OS and result is stored as __ul_global.taskhandle.
	* sys/_syslib.s:
	Removed X bit from SWI calls made before setting up our UnixLib OS
	environment handlers so that an error will call the default error
	handler automatically.
	(__get_cpu_arch): wasn't called when ___dynamic_no_da was set.
	(__unixlib_get_fpstatus): prefix with function name.
	(__unixlib_set_fpstatus): likewise.
	(__valid_address): likewise.
	(__unixlib_cli): dropped and its contents is now __ul_global.cli.
	(__time): dropped and its contents is now __ul_global.time.
	(__notused1):): dropped and its contents is now __ul_global.unused1.
	(__taskwindow): dropped and its contents is now
	__ul_global.taskwindow.
	(__taskhandle): dropped and its contents is now
	__ul_global.taskhandle.
	(__dynamic_num): dropped and its contents is now
	__ul_global.dynamic_num.
	(__old_u): dropped and its contents is now __ul_global.unused4.
	(__32bit): removed, this can easily and cheaply found out at run-time.
	(__panic_mode): dropped and its contents is now
	__ul_global.panic_mode.
	(__proc): dropped and its contents is now __ul_global.sulproc.
	(__ul_pagesize): dropped and its contents is now
	__ul_global.pagesize.
	(__upcall_handler_addr): dropped and its contents is now
	__ul_global.upcall_handler_addr.
	(__upcall_handler_r12): dropped and its contents is now
	__ul_global.upcall_handler_r12.
	(__pthread_return_address): dropped and its contents is now
	__ul_global.pthread_return_address.
	(__pthread_worksemaphore): dropped and its contents is now
	__ul_global.pthread_worksemaphore.
	(__pthread_system_running): dropped and its contents is now
	__ul_global.pthread_system_running.
	(__pthread_callback_semaphore): dropped and its contents is now
	__ul_global.pthread_callback_semaphore.
	(__pthread_callback_missed): dropped and its contents is now
	__ul_global.pthread_callback_missed.
	(__pthread_num_running_threads): dropped and its contents is now
	__ul_global.pthread_num_running_threads.
	(__executing_signalhandler): dropped and its contents is now
	__ul_global.executing_signalhandler.
	(__signalhandler_sl): dropped and its contents is now
	__ul_global.signalhandler_sl.
	(__signalhandler_sp): dropped and its contents is now
	__ul_global.signalhandler_sp.
	(__escape_disabled): dropped and its contents is now
	__ul_global.escape_disabled.

Sat Oct  6 17:32:59 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* sys/_vfork.s (fork,vfork): Prevent register corruption v4 and v5.

Sun Sep  2 02:19:59 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* gcccompat/_b_return.s: Made code usable for libscl.
	* gcccompat/_galloca.s: Likewise.
	* gcccompat/galloca.c: Likewise.
	(__gcc_alloca_return_address): strip off the PC flags of return value
	when running in 26-bit mode.
	* gcccompat/_b_frame.s: Likewise.

Thu Aug 30 01:36:41 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl(sul): Reverted previous (unwanted and undocumented)
	change as it required libscl to be present; use STRIP iso OBJCOPY
	to extract binary blob out of ELF file which has the advantage that
	this is already defined in GCC build system.

Fri Aug 24 01:38:30 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/system.c(system): whitespace changes; use EXIT_FAILURE for
	_exit.
	* common/objattr.c: Whitespace changes.
	* common/symlinks.c: Likewise.
	* common/exist.c: Likewise.
	* sys/_syslib.s: Likewise.
	* unix/dev.c: Likewise.
	* unix/unix.c: Likewise.
	* stdlib/qsort.c(__UNIXLIB_PARANOID): use non-0 testing iso a strict
	positive test.
	* unix/dev.c(__UNIXLIB_SYMLINKS): Likewise.
	* common/objattr.c(__UNIXLIB_SYMLINKS): Likewise.
	* common/exist.c(__UNIXLIB_SYMLINKS): Likewise.
	* include/unixlib/unix.h(__UNIXLIB_PARANOID,__UNIXLIB_SYMLINKS):
	Likewise.
	* unix/getenv.c(__getenv_from_os): Updated comment on its API.
	* scl/_kcurskch.s(_kernel_current_stack_chunk): _kernel_chunk_stack
	was wrongly located and always returned NULL.
	* test/scl/test-kernel_current_stack_chunk.c: Added.
	* include/unixlib/asm_dec.s: Updated comment on CHUNK_* values.
	* include/kernel.h(__rt_allocauto): removed prototypes as it is no
	longer implemented.
	(__rt_freeauto): Likewise.
	* contrib/Help: Updated pointer to other documents.
	* sys/execlp.c: Updated comments.
	* sys/execvp.c: Likewise.

Mon Aug 20 22:41:11 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl: forgot to escape special chararacters in previous
	change.

Fri Aug 17 23:49:29 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* sys/exec.c(execve): support __UNIXLIB_SYMLINKS.

Thu Aug 16 23:40:21 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* gen-auto.pl: Define tooldir in produced Makefile.am so that partial
	build (or out-of-tree) of UnixLib works.

Wed Aug 8 19:03:03 2007  Lee Noar  <leenoar@sky.com>

	* common/symlinks.c: Don't use C based file access functions,
	because we may be called from one. Instead use low level OS
	functions.

Sat Aug 4 18:53:54 2007  Lee Noar  <leenoar@sky.com>

	* unix/dev.c: Add support for symlink files.
	* include/unixlib/buildoptions.h: Likewise.
	* include/unixlib/unix.h: Likewise.
	* common/objattr.c: Likewise.
	* common/exist.c: Likewise.
	* common/symlinks.c: New file. Implement symlink file processing.
	Primarily for use by GCC so that, eg, -lstdc++ will find symlink
	libstdc++.so which in turn points to libstdc++.6.0.8.so.

Sat Aug 4 17:39:01 2007  Lee Noar  <leenoar@sky.com>

	* vscript: Remove __pthread_cleanup_pop & __pthread_cleanup_push to
	make them visible from outside the DSO, as they could be called from
	a user program.

Sat Aug 4 14:40:20 2007  Lee Noar  <leenoar@sky.com>

	* vscript: Remove __pthread_start_ticker & __pthread_stop_ticker to
	make them visible from outside the DSO. Add __gcc_alloca_free_1 as
	it's only called by __gcc_alloca_free. Hiding it means a direct call
	instead of via the PLT and __gcc_alloca_free doesn't need to load
	the PIC register.

Tue Jul 10 00:53:25 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* include/sys/cdefs.h(__REDIRECT, __REDIRECT_NTH): Define.
	* include/sys/stat.h(struct stat): Define struct stat equal to the
	already existing struct stat64 and avoid the #define stat stat64 hack.
	Update function declaration of fstat64 and lstat64.
	* unix/lstat.c(lstat64): Use struct stat64 iso struct stat.
	* unix/fstat.c(fstat64): Likewise.
	* unix/stat.c(stat64): Likewise.
	* common/riscosify.c(translate_or_null): Avoid cast.

Fri Jul 6 14:16:12 2007  Lee Noar  <leenoar@sky.com>

	* pthread/_context.s: Change PIC code to load PIC register from
	16 byte array instead of 4 byte array.
	* pthread/_yield.s: Likewise.
	* pthread/_ints.s: Likewise.
	* signal/_demangle.s: Likewise.
	* signal/_signal.s: Likewise.
	* common/_exist.s: Likewise.
	* common/_riscosify.s: Likewise.
	* gcccompat/_b_return.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_vfork.s: Likewise.
	* sys/_syslib.s: Likewise.

Sat Jun 30 11:55:12 2007  Lee Noar  <leenoar@sky.com>

	* sys/_syslib.s(__main): Using registers to receive data from
	crt1-riscos is not very elegant and we can't use the stack as it
	may not exist, so use a block of memory defined in crt1-riscos
	instead.

Tue Jun 19 20:00:43 2007  Lee Noar  <leenoar@sky.com>

	* sys/_syslib.s(__main): Change below (r2667) did not solve
	anything as it still uses the stack. Abandon using the stack
	altogether and use only registers to receive data from crt1-riscos.

Tue Jun 19 19:18:29 2007  Lee Noar  <leenoar@sky.com>

	* sys/_syslib.s(__main): Receive the _init/_fini function ptrs
	via registers as statically linked binaries may not have a
	valid stack pointer.

Sun Jun 17 16:23:01 2007  Lee Noar  <leenoar@sky.com>

	* include/unixlib/asm_dec.s: Remove XSOM_GOTFromAddr from the
	list of SWIs. The new PIC scheme makes it redundant.
	* include/swis.h: Change SWI number for SOM_DeregisterClient
	to account for the removal of SOM_Prologue and SOM_Resolver.

Sun Jun 17 14:30:21 2007  Lee Noar  <leenoar@sky.com>

	* gen-auto.pl: Remove -lpic from linker flags as it is no
	longer required.

Fri Jun 15 17:41:54 2007  Lee Noar  <leenoar@sky.com>

	* pthread/_context.s: Use new PIC register loading scheme.
	* pthread/_yields.s: Likewise.
	* pthread/_ints.s: Likewise.
	* common/_exist.s: Likewise.
	* common/_riscosify.s: Likewise.
	* gcccompat/_b_return.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_vfork.s: Likewise.
	* signal/_demangle.s: Likewise.
	* signal/_signal.s: Use new PIC register loading scheme.
	(__h_cback_common): Fix bug in DSO; when copying registers, start
	from the correct position in __cbreg.
	* sys/_syslib.s: Use new PIC register loading scheme.
	(__main): Retrieve values passed by crt1-riscos.o from the stack
	rather than from registers and store them as required. Register
	the program's _fini function with atexit() and call its _init
	function after library initialisation, but before main() is
	called. This replaces the call to __gccmain(). This is necessary
	as eventually, we'll also want to call the _init functions of all
	the shared libraries here too. Where the PIC register (v4) is used
	for non-PIC code, replace with v6.

Wed May 16 21:34:47 2007  Lee Noar  <leenoar@sky.com>

	* signal/_signal.s(__h_sigint): Fixed bug in DSO where r12 was assumed
	to be GOT pointer, but was actually reused for something else.

Wed Apr 11 03:21:40 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* string/{_ffs.s,_ffsll.s}: the armv5 implemenation didn't work at
	all; replaced the non-armv5 implementation by a faster algorithm from
	David Seal.
	* pthread/_ints.s: DCB -> .asciz
	* gen-auto: moved from GCCSDK recipe/files/scripts/reconf-libunixlib-01
	to here; updated it so that the configure.ac is generated from
	configure.template filling in the AC_OUTPUT parameters; updated it
	to create TESTS for each test subdirectories.
	* test: reorganised the test files.
	* gcccompat/galloca.c: fixed wrong test on __UNIXLIB_PARANOID to
	determine if asserts need to be enabled or not.

Tue Apr 10 19:10:01 2007  Lee Noar  <leenoar@ntlworld.com>

	* libtool.m4: Remove occurrences of -fcall-used-v5 as it's now implied
	by -fPIC.

Mon Apr  9 21:16:29 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	Removed the last pre-UnixLib 5 only alloca implementation remains:
	* include/pthread.h(struct __pthread_thread): reduced alloca entry
	array of 3 pointers to just one pointer. The other array entries
	were not used.
	* pthread/newnode.c: following above change in struct
	__pthread_thread.
	* include/unixlib/asm_dec.s: likewise.
	* gcccompat/galloca.c: likewise.
	Enabled asserts for __UNIXLIB_PARANOID enabled builds.  Listen to
	__UNIXLIB_ALLOCA_FATAL to determine what to do if alloca() fails due
	to memory failure.
	(__gcc_alloca_longjmp_free): added, restores the alloca chunk list
	at longjmp() time.
	* sys/_jmp.s(setjmp,longjmp): alloca_list no longer exists so no
	longer (re)storing this weak value. longjmp() calls
	__gcc_alloca_longjmp_free() when the alloca chunk list is different
	than that setjmp() time. Soft-float builds are no longer storing
	the floating point registers.
	* include/setjmp.h(jmp_buf): following above change in struct
	jmp_buf.
	* gcccompat/_b_frame.s: fixed comments which got incorrectly changed
	by the aof2elf assembler conversion.
	* pthread/_ints.s(__pthread_protect_unsafe): don't resore pc flags in
	__pthread_unprotect_unsafe value when running on 26 bit systems (not
	needed for APCS-32).
	* sys/_syslib.s(use_existing_chunk): don't restore pc flags in
	__free_stack_chunk value when running on 26 bit systems (not needed
	for APCS-32).

Mon Apr  9 01:57:11 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* signal/_signal.s(unrecoverable_error): don't test for FPU exception
	in soft-float build.
	* module/sul.s: explicit fpu specification as "fpa" as we're using
	FP instructions even in a soft-float build.
	* string/_memcpy.s: explicit arch specification as "armv6" to allow
	PLD instructions even if we're building with another -march compiler
	option.
	* README(<program name>$HeapMax): clarified it a little bit more.

Sat Apr  7 16:06:43 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/alloc.c(calloc): Detect size_t overflow for total size
	calculation as this might result in a non-NULL return value letting
	the caller believe it has a memory block that big.

Fri Apr  6 18:37:14 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* include/stdio.h(__STDIOLIB__): Removed static __stdiolib function
	pointer to __stdioinit (). It wasn't needed anymore for quite some
	time.
	* stdio/{freopen.c,fputs.c,fgets.c,perror.c,putc.c,flsbuf.c,getc.c
	stdio.c,ungetc.c,setbuf.c,puts.c,putw.c,fwrite.c,tmpfile.c,gets.c
	getw.c,filbuf.c,fopen.c,fpos.c,fclose.c,popen.c,fread.c,fflush.c}:
	Removed __STDIOLIB__.

Fri Mar 30 19:16:19 2007  Lee Noar  <leenoar@ntlworld.com>

	* vscript: New file. A linker file containing a list of symbols that
	are global within the DSO, but should not be visible outside the library
	as they are not part of its API. This has the same effect as declaring
	each symbol as hidden. The file is actually a version script, hence the
	name, but version information is not used in this case.

	There are a number of advantages to hiding such symbols:
	a) The API/public interface of the library is cleaner and hides the
	   internal workings.
	b) Library initialisation is quicker as there are fewer relocations at
	   runtime (the static linker is able to resolve more symbols at build
	   time).
	c) Functions that are only ever called from within the library and are
	   hidden are called directly and not via the PLT making the library
	   more efficient.

	More symbols may be added to the list in the future as it becomes clearer
	which qualify for inclusion.

Tue Mar 27 02:11:36 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* include/unixlib/asm_dec.s: include internal/defines.h; removed define
	TRUE/FALSE as it was not used.
	* include/unixlib/buildoptions.h(__UNIXLIB_CLZ_SUPPORTED): Removed,
	using __ARM_ARCH__ #define value instead.
	* string/_ffsll.s: Likewise.
	* string/_ffs.s: Likewise.
	* incl-local/internal/defines.h(__ARM_ARCH__,__ARM_ARCH_STR__): New
	file.
	* sys/_syslib.s: Reenabled runtime minimal ARM architecture check, was
	previously on XSCALE only, now based on __ARM_ARCH__ build and
	__get_cpu_arch runtime result.
	* README: updated with GCCSDK 4 build info.

Sat Mar 24 16:51:41 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/elf-macros.s (NetSWI0): Fixed odd typo.

Tue Mar 20 20:03:46 2007  Lee Noar  <leenoar@ntlworld.com>

	* sys/_syslib.s: Change visibility of main function pointer to hidden.
	This prevents the dynamic linker from linking against main() in the
	executable.

Sun Mar 11 18:34:50 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/elf-macros.s(UL_MEMORY_LAYOUT): Moving back to...
	* sys/_syslib.s: ...here.  Restored our stack ASCII art.
	* include/unixlib/asm_dec.s: Updated comments.

Sun Mar 11 16:54:44 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* incl-local/internal/aof-macros.s: Removed, no longer used.
	* incl-local/internal/elf-macros.s(__UNIXLIB_ERRNO_THREADED): changed
	from assembler test to preprocessor test; (__SOFTFP__) no longer
	defined as 0 when it is not defined.
	* include/unixlib/buildoptions.h(__UNIXLIB_ELF): Removed, no longer
	used.
	* unix/features.c : Removed tests on __ELF__, this is always 'true'
	from now on.
	* unix/unix.c: Likewise.
	* pthread/_exit.s: Likewise.
	* signal/_signal.s: Likewise.
	* include/features.h: Likewise.
	* include/unixlib/unix.h: Likewise.
	* include/sys/cdefs.h: Likewise.
	* gcccompat/_b_return.s: Likewise.
	* gcccompat/_galloca.s: Likewise.
	* gcccompat/galloca.c: Likewise.
	* gcccompat/_b_frame.s: Likewise.
	* string/_memcpy.s: Likewise.
	* string/_memset.s: Likewise.
	* sys/_syslib.s: Likewise.
	* sys/mman.c: Likewise.
	* include: Removed svn:ignore property.  No longer relevant.
	* include/unixlib: Updated svn:ignore property, buildoptions.s is no
	longer used nor exists.
	* include/endian.h: Typo fix.
	* pthread/_context.s (__SOFTFP__): Test on existance and not on its
	value.
	* sys/_jmp.s: Likewise.
	* sys/_syslib.s: Likewise.
	* README: Documented __program_name.
	* sys/_alloca.s: Removed, no longer needed.

Sat Mar 10 21:21:23 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* Used convert-unixlib.pl for the last time and stored its ELF
	result in SVN as trunk/gcc4/recipe/files/libunixlib.

Tue Mar 06 21:03:02 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/clib/unixlib/unix.h: When not compiling for the
	shared library, use padding in place of the main function
	pointer to maintain structure offsets.
	* source/sys/_syslib.s: Always define the word that stores
	the main function pointer to maintain structure offsets,
	but only name it in the shared library.

Sun Mar 04 14:55:23 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/unix/unix.c: Remove the dependency on the main symbol
	from the shared library by declaring and accessing it as a
	function pointer.
	* source/clib/unixlib/unix.h: Add main function pointer to
	__ul_global structure (shared library only).
	* source/clib/unixlib/asm_dec.s: Add main function pointer to
	GBL_* structure (shared library only).
	* source/sys/_syslib.s: In the shared library, initialise the
	main function pointer from the arguments passed to it in
	crti-riscos.asm and add main function pointer to the
	__ul_global structure.

Sun Jan 21 15:21:56 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/features.h, source/common/_exist.s: Change default
	value of __feature_imagefs_is_file to 1.

Fri Jan 19 15:56:39 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_syslib.s: Undo changes made Thu Jan 18.
	* source/unix/unix.c: Change comment about _main.

Thu Jan 18 19:39:06 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_syslib.s: For the ELF build, convert __main into
	an initialisation function called __unixlib_main that returns
	to its caller. This allows the call to _main (and ultimately
	main()) to be moved to the executable.
	* source/unix/unix.c: Don't compile _main() for the ELF build.
	It is moved to crti-riscos.asm so that it can call main() in the
	executable.

Sat Jan 13 19:06:23 2007  Lee Noar  <leenoar@ntlworld.com>

	* elf/libtool.m4: Change names of shared library and symlinks to
	something that is recognised by GCC (effects libunixlib and libm
	only). In the dlopen test, look for riscos at the end of the
	string rather than the beginning.

Fri Jan 12 21:29:54 2007  Lee Noar  <leenoar@ntlworld.com>

	* elf/convert-unixlib.pl: Link libunixlib.so with shared libgcc.

Sat Jan 06 01:25:35 2007  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/pthread/_exit.s: Use v1 for function table pointer;
	a2 need not be preserved by callees under APCS

Fri Jan 05 17:13:54 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_syslib.s (__main):
	Use correct PIC register which is v6 in this case, not v4.
	Make sure v6 (PIC register) is not used for anything else so that
	it is valid throughout the routine (anticipating future changes).

Thu Jan 04 18:17:23 2007  Lee Noar  <leenoar@ntlworld.com>

	* source/string/rawmemchr.c: Declare rawmemchr as alias for __rawmemchr
	otherwise rawmemchr is undefined.

Wed Dec 27 12:22:23 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/clib/sys/elf.h: Correct spelling of R_ARM_JUMP_SLOT.

Wed Dec 27 03:08:02 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/{stdarg.h,stddef.h,varargs.h}: Restored as clean build
	of GCC 3.4.6 did not work anymore (got obfuscated by a copy in
	$GCCSDK_INSTALL_ENV/include/unixlib).
	* source/gcccompat/_b_frame.s: Previous change broke the ELF shared
	build.

Tue Dec 26 21:12:06 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/gcccompat/{_b_return.s,_b_frame.s,_galloca.s,galloca.c}:
	finished and reworked the alloca, __builtin_return_address and
	__builtin_frame_address implementations for GCC 4
	This improves the gcc/g++ testsuite results.

Tue Dec 26 16:26:23 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/pthread/_exit.s: Fix FIXMEs, ie, don't use
	__alloca_thread_free_all or ___arm_alloca_thread_free_all in
	ELF build.

Tue Dec 26 14:59:48 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_syslib.s: Move DECLARE_FUNCTION of __trim_stack to the
	end of __free_stack_chain as technically they are part of the same
	function and also there's a possibility that the compiler may
	separate them in the resulting object file.

Mon Dec 25 17:03:19 2006  Lee Noar  <leenoar@ntlworld.com>

	* elf/convert-unixlib.pl: Link libpic.a into libunixlib.so and add
	version info to libunixlib.so and libm.so.

Wed Dec 20 20:47:17 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	Small bit of code reshuffling and cleanup before addressing the
	remaining source/gcccompat alloca work.
	* source/stdlib/random.c: GCC has inline.
	* source/stdlib/div.c: Remove __GNUC__ check.
	* source/unix/unix.c: Uppercase start char of __unixlib_fatal() calls.
	* source/pthread/_exit.s(___arm_alloca_thread_free_all,
	__alloca_thread_free_all): disabled for ELF builds.  These should go
	for good when UnixLib build is ELF only.
	* source/signal/post.c: No longer make use of __backtrace_getfp() by
	using inline assembler.
	* source/clib/unixlib/sigstate.h(__backtrace_getfp): Removed
	declaration.
	* source/signal/_coredump.s(__backtrace_getfp()): Removed file.
	* source/clib/unixlib/asm_dec.s(GBL_,MEM_): Updated comments.
	* source/clib/unixlib/asm_dec.s(CHUNK_): Added CHUNK_ definitions from
	_syslib.s.
	* source/clib/bits/byteswap.h(__bswap_16,__bswap_32): Removed
	declaration.
	* source/netlib/{_bswap_16.s,_bswap_32.s}(__bswap_32,htonl,ntohl,
	__bswap_16,htons,ntohs): Removed files.
	* source/clib/stdio.h: Removed Norcroft specific pragmas.
	* source/scl/_kfpavailable.s(_kernel_fpavailable): Code moved from
	_syslib.s.
	* source/gcccompat/{_moddi3.s,_divdi3.s,_umoddi3.s,_udivdi3.s}
	(__moddi3.s,__divdi3.s,__umoddi3.s,__udivdi3.s): Removed (we've enabled
	those routines in gcc/libgcc/Makefile).
	* source/sys/_alloca.s(alloca,__alloca,__alloca_thread_free_all):
	Disabled code for ELF builds as it is not used.  This file should go
	for good when UnixLib build is ELF only.
	* source/sys/_syslib.s: Moved CHUNK_ definitions to asm_dec.s; Don't
	check for FPEmulator in soft-float builds; Don't export
	__stackchunk_magic_number; Changed termination CR/NL + NUL to NUL for
	fatal error messages; Renamed free_stack_chunk to __free_stack_chunk
	and exported it; Moved __builtin_return_address implementation to
	gcccompat/_b_return.s.; Moved _kernel_fpavailable implementation to
	scl/_kfpavailable.s.; Added important FIXME for __trim_stack; Added
	suggestion for __unixlib_fatal_got_msg improvement.
	* source/gcccompat/_b_return.s(__builtin_return_address): Code moved
	from _syslib.s and added some comments on necessary improvements.
	* source/gcccompat/_galloca.s: Added a couple of FIXMEs.
	* source/gcccompat/galloca.c: Removed __backtrace_getfp() call; Added
	FIXMEs and a couple of small changes (like do not access data from a
	free'd memory block).

Mon Dec 18 03:28:56 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/stdlib/alloc(malloc,free,realloc,memalign,valloc,pvalloc,
	calloc,cfree,malloc_trim): prefixed routine names with '__' and made
	weak aliases for the original routine names to those implementations.
	* source/clib/limits.h(SHRT_MIN,INT_MIN,LONG_MIN,LONG_LONG_MIN): don't
	use C casting as these values should be evaluatable by the preprocessor
	too.
	This improves the g++ testsuite results.

Sun Dec 17 15:31:56 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/{libm-dbl64/s_finite.c,libm-flt32/s_finitef.c}: enable
	call to (currently empty) hidden_def(). This will be needed when we're
	going to hide symbols from shared UnixLib version.
	* source/clib/{complex.h,math.h}: don't declare 'long double' math
	variants here when building UnixLib as they are	declared in the source
	code as aliases to the 'double' variants.
	* source/clib/mathdef.h(__NO_LONG_DOUBLE_MATH): no longer define it so
	this means we're supporting 'long double' math calls but they are in
	reality the same as 'double' ones.
	* source/clib/varargs.h: Removed (falling back on the gcc version).
	* source/clib/bits/mathcalls.h: Using an up-to-date version.
	* source/libm-complex/{creall.c,conjl.c,cabsl.c,cargl.c,cimagl.c}:
	Removed as they are elsewhere declared as aliases to their 'double'
	equivalents.
	* elf/convert-unixlib.pl(NO_LONG_DOUBLE): Defined, meaning we're going
	to alias the 'long double' math routines to the 'double' versions.
	This improves the gcc testsuite results.

Sat Dec 16 14:41:51 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/stddef.h: Removed (falling back on the gcc version).
	* source/clib/bits/mathdef.h(INFINITY): Removed duplicate definition,
	was also defined in source/clib/bits/inf.h.
	This improves the gcc/g++ testsuite results.

Fri Dec 15 04:34:46 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/stdlib.h(atof,atoi,atol,atoll): consistent declaration of
	exported and inline variants.
	This improves the g++ testsuite results.

Sun Dec 10 21:03:51 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/stdarg.h: Removed (falling back on the gcc version).
	* source/string/_memcpy.s: Previous change got a build breaking typo.
	* source/string/_memset.s(memset,bzero): Made exported routines
	weakly defined.
	This improves the gcc/g++ testsuite results.

Sun Dec 10 15:29:31 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/stdio/_printf.s(_printf,_fprintf,_sprintf,_vfprintf,_vprintf,
	_snprintf,_vsprintf,_vsnprintf): Removed.
	* source/stdio/printf.c(vsnprintf,vsprintf,snprintf,sprintf,vprintf,
	fprintf,printf): Prefixed the exported routines with '__' and created
	weak symbols to those routines.
	* source/stdio/vasprintf.c(vasprintf): Likewise.
	* source/stdio/asprintf.c(asprintf): Likewise.
	* source/crypt/crypt_util.c(encrypt_r,setkey_r): Likewise.
	* source/crypt/crypt-entry.c(crypt_r,fcrypt): Likewise.
	* source/string/strndup.c(strndup): Cleanup, weak_alias is always
	defined (even for AOF case).
	* source/string/strnlen.c(strnlen): Likewise.
	* source/resolv/inet_addr.c(inet_aton): Likewise.
	* source/string/_memcpy.s(memcpy,memmove,bcopy): Made exported routines
	weakly defined.
	This all improves the gcc/g++ testsuite results.

Sat Dec 09 14:47:59 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_syslib.s(__rt_stkovf_split_big): Make sure that the frame size
	calculation takes into account the PIC register.

Sat Dec 09 14:26:02 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_jmp.s: Add PIC instructions and declare functions
	for ELF DSO.
	* source/sys/_alloca.s: Likewise.
	* source/sys/_vfork.s: Add PIC instructions and declare functions
	and objects for ELF DSO.
	* source/sys/_syslib.s: As above, also use a macro to define the layout of
	__ul_memory to support AOF/static ELF/shared ELF at the same time without
	unsightly nested conditional assembler.
	* source/sys/_syslib.s(__env_unixlib): Pass GOT pointer to exception
	handlers where possible.

Thur Dec 07 19:42:15 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/clib/errno.h: Ensure C linkage when used with C++
	compiler, otherwise there's a linkage disagreement with
	sys_errlist and sys_nerr in stdio.h.

Wed Dec 06 20:19:15 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/sys/_os.s: Declare functions for ELF DSO.
	* source/sys/_mman.s: Likewise.
	* source/sys/_sigjmp.s: Likewise.
	* source/sys/_swi.s: Likewise.

Wed Dec 06 19:50:16 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/signal/_demangle.s: Add PIC instructions and declare
	function for ELF DSO.
	* source/signal/_signal.s: Add PIC instructions and declare
	functions and objects for ELF DSO.
	* source/signal/_coredump.s: Declare function for ELF DSO.

Wed Dec 06 19:35:42 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/clib/unixlib/asm_dec.s: Add XSOM_GOTFromAddr to list of SWIs.

Wed Dec 06 19:19:42 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/incl-local/internal/aof-macros.s: Define macro UL_MEMORY_LAYOUT
	to make it easier to specify _ul_memory for {AOF/ELF static/ELF shared} in
	sys/_syslib.s.
	* source/incl-local/internal/elf-macros.s: As above, also add PIC instructions
	to __set_errno and __get_errno macros for ELF DSO.

Sun Dec 03 16:36:08 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/pthread/_context.s: Add PIC instructions and declare
	objects and functions for ELF DSO.
	* source/pthread/_yield.s: Likewise.
	* source/pthread/_ints.s: Likewise.
	* source/pthread/_exit.s: Likewise.

Wed Nov 29 22:58:55 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/buildoptions.h: Removed __UNIXLIB_MULL_SUPPORTED
	as it isn't used anymore.

Wed Nov 29 22:43:05 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/buildoptions.h,
	source/incl-local/internal/swiparams.h: Removed
	__UNIXLIB_USEFILEPATH build support and made FILEPATH default instead
	of using Run$Path.

Wed Nov 29 22:10:40 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/{unixlib/buildoptions.h,bits/sockaddr.h,sys/ioctl.h},
	source/netlib/{_sendmsg.s,_recvmsg.s,_getpeerna.s,_recvfrom.s,
	_accept.s,_getsockna.s}: Removed Internet 4 support
	(__UNIXLIB_COMPAT_INET4, which was equivalent to COMPAT_INET4 in
	Acorn's TCPIPLibs headers).

Wed Nov 29 20:36:22 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* Removed build support for Norcroft and LCC compilers (preprocessor
	tests on __UNIXLIB_NORCROFT_BUILD, __CC_NORCROFT,
	__CC_NORCROFT_VERSION, __LCC__).
	* source/{scl/_memchk.s,sys/_profile.s,sys/_longlong.s,sys/_divtest.s,
	sys/_smod.s,sys/_umod.s,sys/_sdiv.s,sys/_sdiv10.s,sys/_udiv.s,
	sys/_udiv10.s}: Removed private Norcroft routines.
	* source/sys/_alloca.s(__rt_freealloc,__rt_allocauto): Likewise.
	* source/sys/_syslib.s(x$stack_overflow,x$stack_overflow_1): Likewise.
	* source/sys/{_udivsi3.s,_modsi3.s,_umodsi3.s,_divsi3.s}: Removed
	unnecessary duplication of GCC private routines (already available in
	libgcc.a).
	* __UNIXLIB_NO_COMPLEX: Removed.
	* Docs/ReadMe,!Help: Updated that we're only support GCC compiler now.

Tue Nov 28 22:48:49 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/stdlib/qsort.c, source/unix/unix.c,
	source/clib/{unixlib/buildoptions.h,bits/libc-lock.h,pthread.h,
	errno.h},source/gcccompat/galloca.c,source/string/strsignal.c,
	source/signal/_signal.s, source/sys/{stackalloc.c,errlist.c,exec.c,
	_jmp.s,_syslib.s}: Remove compile test on __UNIXLIB_FEATURE_PTHREADS.
	pthread support is standard now.
	* source/clib/unixlib/unix.h(struct ul_global): made
	__pthread_worksemaphore and __pthread_callback_semaphore volatile
	as they are (can) be modified under interrupts.

Sat Nov 25 12:36:08 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/incl-local/internal/elf-macros.s: Remove warning notes as
	GAS no longer faults resulting instructions when a tab is included.
	* source/incl-local/internal/aof-macros.s: Always assemble a non-PIC
	instruction in AOF.

Wed Nov 22 19:33:04 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/common/_atomic.s: Declare function for ELF DSO.
	* source/common/_exist.s: Add PIC instructions and declare
	functions and objects for ELF DSO.
	* source/common/_riscosify.s: Likewise.

Tue Nov 21 20:34:20 2006  Lee Noar  <leenoar@ntlworld.com>

	* elf/convert-unixlib.pl: Only handle labels that begin
	with a '.' if they are delimited by '|' to prevent
	clashes with assembler directives.

Mon Nov 20 20:26:46 2006  Lee Noar  <leenoar@ntlworld.com>

	* elf/configure.ac: Enable libtool support to build both
	static and shared versions of libunixlib.

Mon Nov 20 19:57:46 2006  Lee Noar  <leenoar@ntlworld.com>

	* elf/convert-unixlib.pl:
	Alter label handling to allow them to start with a '.'.
	Add include/unixlib/stubs.h to list of install headers.
	Change *_SOURCES and *_LIBRARIES variables to libtool
	versions.
	Make sure libtool doesn't try to link libunixlib against
	itself by passing -nostdlib to compiler.
	Change nostackfiles dependencies to work with libtool.
	Add elf/libtool.m4 to list of files to copy.
	Add include path to aclocal-1.9 command to ensure it picks
	up the elf/libtool.m4 file.

Mon Nov 20 19:00:46 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/clib/dlfcn.h: New file. Provide defines, etc for
	dynamic linker.

Sun Nov 19 19:37:30 2006  Lee Noar  <leenoar@ntlworld.com>

	* elf/libtool.m4: New file to provide alternative versions
	of autoconf macros AC_LIBTOOL_SYS_DYNAMIC_LINKER,
	AC_LIBTOOL_PROG_COMPILER_PIC and AC_LIBTOOL_DLOPEN_SELF.
	These override the standard macros to allow RISC OS target
	to be detected during configuring of Unixlib.

Sun Nov 19 17:01:30 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/netlib/getnameinfo.c: Only compile for static library to
	prevent multiple definition of getnameinfo() (also defined in
	netlib/getaddrinfo.c) when linking shared library.

Sun Nov 19 16:05:12 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/incl-local/internal/aof-macros.s:
	Add macro to define word of data to mirror same
	macro in elf-macros.s.
	Add NOP macros to mirror those in elf-macros.s that
	are used for the ELF shared library.

Sun Nov 19 14:58:12 2006  Lee Noar  <leenoar@ntlworld.com>

	* source/incl-local/internal/elf-macros.s:
	Disable macro extension to allow quoted macro arguments.
	Change label names in NAME macro to allow multiple use.
	Add macros to declare type and size of functions and objects
	defined in assembler.
	Add macros to conditionally assemble PIC instructions for shared
	library.
	Add macro to define word of data with or without GOT relocation
	depending on library being built.

Tue Nov  7 19:44:12 2006  Lee Noar  <leenoar@ntlworld.com>

	* unixlib/elf/convert-unixlib.pl: Added code to generate stubs header
	for ELF version (adapted from gen-makefiles.pl).

Sun Oct  8 19:38:58 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/sys/elf.h: Added (copy of Lee Noar's GCCSDK 3.4.6 patch
	of his ELF work).

Wed Oct  4 22:22:30 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* Removed all CVS identifiers, updated Copyright statements and years
	based on SVN history (but UnixLib history starts before CVS/SVN so
	start dates are not always correct).

Sun Oct 01 01:02:06 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	Start of UnixLib 5.0 as RISC OS RunTime lib in ELF format.
	* source/debug/dvsprintf.c: renamed isxdigit()/isdigit()/tolower()/
	toupper()/strnlen() to local_* as this gave warnings and an error
	with GCC 4.1.1.
	* source/common/riscosify.c: temporary disabled RO_ENV support as
	GCC 4 ELF build does not have support for this.
	* source/sys/_syslib.s: temporary disabled the XScale test as it
	not supported by the convert-unixlib.pl right now.
	(__builtin_return_address): Added (code from Nick Burrett).
	* elf/convert-unixlib.pl: updated so it works with the current
	UnixLib code base and the build system we've now setup for GCC 4.1.
	* !Help: Update version to 5.0.
	* source/clib/features.h (__ULIBC__, __ULIBC_MINOR__): Updated it to
	5.0.

[ ^^^ Here starts UnixLib 5.0 ^^^ ]
-----------------------------------------------------------------------
Sun Jul 29 20:17:09 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: update section on pthread & Wimp behaviour after recent
	progress in this area.

Sun Jul 29 15:00:17 CET 2007  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/sys/__getcpuarch.s(__get_cpu_arch): wrong result for ARM
	architecture 3 processors.

-----------------------------------------------------------------------
[ vvv Here ends UnixLib 4.6 vvv ]

Sun Jul 15 13:52:59 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.6.
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 6.

Sun Jul  8 19:14:58 CET 2007  John-Mark Bell  <jmb@netsurf-browser.org>
                              John Tytgat  <John.Tytgat@aaug.net>

	* source/pthread/_context.s: enabled pthread Wimp filter code after
	fixing following:
	(start_call_every,stop_call_every) full register + processor flag
	preserve.
	(__pthread_start_ticker, __pthread_stop_ticker) post filter mask was
	inverted.
	(__pthread_start_ticker) recheck if we're not yet a task since last
	check.
	* source/sys/_syslib.s: don't write bogus GBL_TASKHANDLE when
	Wimp_ReadSysInfo fails.
	* source/test/pthread/create-join.c: new pthread test case.

Wed May 23 20:31:26 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/include/unixlib/types.h: Fix typo in typedef.

Sun Apr 29 17:55:43 CET 2007  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/unix/unix.c(find_redirection_type): don't go beyond start of
	cmdline when it starts with the redirection_type character or one or
	more digits followed by the redirection_type character.

Tue Mar 27 01:48:55 CET 2007  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/unix.h(__get_cpu_arch): Declare.  Gives rough
	indication which ARM architecture we're running on.
	* source/sys/_getcpuarch.s(__get_cpu_arch): New file.
	* unix/uname.c(uname): changed utsname.sysname from "riscos" into
	"RISC OS" and utsname.machine from "arm-acorn" into "armvxl" with 'x'
	the major ARM architecture digit.

Thu Jan 18 21:59:26 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/errno.h: Change EDEADLK value for TCPIPLibs
	compatibility and add ENOTSUP.

Sun Jan 14 16:38:22 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/errno.h: Change EAGAIN value to the same as
	EWOULDBLOCK, to match TCPIPLibs and Linux.

Thu Jan 11 21:48:46 CET 2007  Martin Wuerthner  <martin@mw-software.com>

	* source/common/riscosify.c (__riscosify_scl): Incorrect program name
	  determination for programs run as "*Run MyLibrary:myprog".

Sun Dec 24 15:01:25 PST 2006  Peter Naulls <peter@chocky.org>

	* source/sys/exec.c: Add to the hack that checks whether we use
	 argv[0] or not - canonicalise RISC OS versions of the filenames before
	 comparing.

Mon Dec 04 01:59:39 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/string/strnicmp.c: Compare lowercased versions of strings
	rather than uppercase. This matches the manpage (and what stricmp
	does).

Tue Nov 21 21:45:22 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/sync.c (fsync): Don't error on files open with
	  O_RDWR

Sat Oct 21 22:38:13 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/regex.h: Made it usable for C++ programs.

Wed Oct  4 23:13:35 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/exec.c (execve): Made code slightly less obfuscated.

Tue Sep 26 23:14:57 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/time/mktime.c: Fix corruption of input structure (bug #152)

[ ^^^ Here starts UnixLib 4.x ^^^ ]
-----------------------------------------------------------------------
[ vvv Here ends UnixLib 4.5 vvv ]

Thu Sep 14 01:25:05 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.5.
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 5.
	* Docs/ReadMe: reformated last change.

Wed Sep 13 22:13:35 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/common/riscosify.c (riscosify_scl): Add support for
	  UnixEnv$foo$sfix.

Sat Sep  9 12:24:32 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (readdir_r): Fix suffix swapping code.
	  Fix the result value (POSIX states it should be the value of
	  entry, or NULL).

Fri Sep  8 16:42:35 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/common/unixify.c: Fix unixify early exits to return pointer to
	  buffer rather than pointer to NULL terminator.
	* source/test/testunixify.c: Add test for "..".

Mon Sep  4 06:43:03 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/Makefile.in, source/common/riscosify.c: Avoid using hard-wired
	  "/home/riscos/env/" path.
	* source/clib/bits/posix_opt.h: Refine further.

Sat Aug 26 16:59:31 CET 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/pthread/{*.c,*.s}: Removed CVS keywords and made Copyright
	  statements conforming.
	* source/pthread/_context.s: Fixed comment.
	* source/pthread/_yield.s: Renamed callback_return to
	  __pthread_yield_return and gave it an APCS function name so we see
	  the thread waiting in the backtrace.
	* source/pthread/_ints.s: Use SWP instead off swp_arm2 macro.
	* source/pthread/_exit.s: Small optimisation.
	* source/signal.post.c(__write_backtrace,__write_backtrace_thead):
	  output backtrace per created thread.
	* source/signal/_signal.s: Updated comments.
	  (__h_exit) Setup signal stackhandler as the USR26/USR32 registers
	  can not be trusted (e.g. TaskManager calling OS_Exit when <Alt><Break>
	  gets pressed).
	* source/clib/unixlib/buildoptions.h: Removed __UNIXLIB_SWP_SUPPORTED. No
	  longer supporting or pretending to support ARM2.
	* source/incl-local/internal/aof-macros.s: Removed swp_arm2 macro.
	* source/incl-local/internal/elf-macros.s: Likewise.
	* source/sys/_syslib.s: Likewise.  Tabbified.

Sun Aug 13 11:45:32 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/sys/_syslib.s: Improve XScale check (from John-Mark Bell /
	  Adrian Lees).
	* source/wchar/mbsrtowcs.c: Add alias.

Sat Aug 12 07:15:40 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/unix/sync.c: More robust handling of file handles.

Thu Aug 10 20:48:03 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/bits/posix_opt.h: Revise further
	* Docs/ReadMe: Update with notes about POSIX compatibility

Thu Aug 10 13:53:58 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/sys/_syslib.s: Check for RISC OS 5 when built for XScale.

Sun Aug  6 12:47:09 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/Makefile.in: Mark generated clib/unixlib/buildoptions.s file
	  clearly as a derived file.
	* debug/dvsprintf.c: don't make use of routines which have stack
	  checking enabled.  Write all info via __os_print() and not via stderr.
	* source/clib/unixlib/buildoptions.s: Removed (it will be generated
	  in the build).
	* source/clib/unixlib/asm_dec.s: Added SIGSTAK as alias for SIGEMT.
	* source/clib/bits/signum.h: Made SIGSTAK an alias for SIGEMT instead
	  of allocating an unique signal number (which is already beyound
	  the currently 32 supported signal set).
	* source/signal/signame.c: Reformated.
	* source/clib/unixlib/sigstate.h,source/signal/post.c,
	  source/signal/_demangle.s: respect the __cxa_demangle() API, i.e. all
	  its buffers are heap buffers.
	* sys/stackalloc.c: Include sys/debug.h when #define DEBUG is done.
	  (incr_downards): add check if downwards stack increasing doesn't mean
	  going lower than zero page.

Sat Aug  5 16:33:17 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/bits/posix_opt.h: Be less optimistic about what
	  we support.
	* source/clib/bits/signum.h: Declare SIGSTAK for compatibility
	  with Acorn C.

Wed Aug  2 08:41:59 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/unistd.h, source/clib/bits/posix_opt.h: Add
	  posix_opt header and set RISC OS features.  In particular,
	  set flags indicating UnixLib supports POSIX threads, required
	  by X libraries.

Sun Jul 30 19:12:17 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/sigstate.h,source/signal/_demangle.s
	  (__unixlib_cxa_demangle): via WEAK symbol, make libstdc++'s
	  __cxa_demangle routine available internally when it's possible.
	* source/signal/post.c(extract_name): make use of
	  __unixlib_cxa_demangle during __write_backtrace.
	* source/signal/post.c(__write_backtrace): don't output registers
	  when __ul_callbackfp is NULL as then they don't make any sense.
	* source/stdlib/_rand48.c: Removed bogus CVS tags.
	* source/signal/_signal.s,source_sys/_syslib.s: Minor comment
	  improvement.
	* Docs/Changelog: char 0xA0 -> 0x20.

Sat Jul 15 21:35:32 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/tty.c,source/clib/unixlib/fd.h: minor src code cleanup.
	* source/clib/unixlib/unix.h,source/common/funcallerr.c: made
	  __UNIXLIB_PARANOID build working again and added extra test on
	  function pointers be lower than __ul_memory.appspace_himem value.

Sun Jul  9 13:52:36 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Remove part of previous change so that
	  names such as foo/bar.c get translated correctly.

Fri Jun 16 12:03:17 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/stdio/scanf.c: Fix handling of width-limited character classes.
	  Previously re-read the last character that matched the format string.
	* source/test/stdio/tsscanf.c: Testcase for the above.

Thu Jun  8 00:17:00 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.4
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 4.
	* source/signal/post.c (__write_backtrace): show explicitly the
	  processor mode and flags when in 26bit mode; show memory contents of
	  disassembled part as words and ASCII interpretation of its bytes.

Wed Jun  7 22:52:47 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/sys/_syslib.s: Search for SUL in UnixLib:Modules
	  as well as System:Modules.

Sun May 21 20:36:42 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Don't do suffix swapping if the leafname
	  has a / in it.
	* source/test/testriscosify.c: Add extra testcase.

Tue Apr 11 17:40:56 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Allocate some memory to store the head of the
	  linked list so user mode code does not need to access the module
	  private word.
	  Fixed R4 corruption of SWI SharedUnixLibrary_RegisterUpCall.

Fri Mar 10 21:25:47 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Prevent canonicalising program name if it is
	  just a leafname.

Thu Mar  9 19:33:31 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unistd.h: Add lchown().
	* source/unistd/lchown.c: New file.

Sun Feb 26 23:51:25 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/netlib/getaddrinfo.c(gai_strerror): Always wrongly returned
	  "Unknown error".
	* source/resolv/gethnameaddr.c(gethostbyname2): Use hosts file as
	  fallback when resolv query failed.

Tue Feb 14 23:31:18 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 3.

Mon Feb 14 00:39:17 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.3
	* Docs.ReadMe: Current iconv module version is 0.07.  Also using more
	  stable URL.

Sun Feb 12 17:31:43 2006  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/common/unixify.c: Obey __RISCOSIFY_NO_REVERSE_SUFFIX.

Sun Feb 12 13:29:24 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/stdio.h (__io_mode): Changed struct into union so that
	  all bits can be set to zero in __getmode() in a more clean way.
	* source/stdio/fclose.c (fclose): Following stdio.h(__io_mode) change.
	* source/stdio/fflush.c (fflush): Likewise.
	* source/stdio/filbuf.c (check_stream): Likewise.
	* source/stdio/fopen.c (fopen, fdopen): Likewise.
	* source/stdio/fpos.c (fseek, ftell): Likewise.
	* source/stdio/fread.c (fread): Likewise.
	* source/stdio/freopen.c (freopen): Likewise.
	* source/stdio/fwrite.c (fwrite): Likewise.
	* source/stdio/getc.c (fgetc): Likewise.
	* source/stdio/newstream.c (__stream_init, __getmode): Likewise.
	* source/stdio/popen.c (pclose): Likewise.
	* source/stdio/printf.c (vsnprintf): Likewise.
	* source/stdio/putc.c (fputc): Likewise.
	* source/stdio/scanf.c (vsscanf): Likewise.
	* source/stdio/setbuf.c (setvbuf): Likewise.
	* source/stdio/ungetc.c (ungetc): Likewise.
	* source/stdio/vfprintf.c (__vfprintf): Likewise.
	* source/gcccompat/_galloca.s: Added missing END.
	* source/unix/dirent.c: Reduced compiler warnings.
	* source/unix/open.c: Likewise.
	* source/unix/select.c: Likewise.
	* source/unix/unix.c: Likewise.

Sun Jan 29 00:29:13 2006  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: DRenderer is now part of GCCSDK where further development
	  can take place.

Wed Dec 14 21:07:03 2005  Peter Naulls  <peter@chocky.org>

	* !Help: Update version to 4.2
	* source/sound/dsp.c: Buffer calculation improvements
	  from Alan Buckley.
	* source/clib/local.h, source/common/unixify.c:
          New __unixify_ext function.

Sun Dec  4 17:11:31 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Don't convert absolute filenames that
	  are already in Unix format.

Wed Nov 16 03:38:56 2005  John Tytgat  <John.Tytgat@aaug.net>

	* Removed EMBED_RCSID.
	* Removed 'register' keyword in all non-imported source files.

Sun Nov 13 15:44:22 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Cope with command lines where RISC OS has
	  stripped the temporary FS from the start.

Sat Nov 12 17:43:11 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/sys/exec.c: Strip any spaces before the command.
	* source/unix/dev.c (__pipeselect): Don't block on EOF.
	* source/unix/fcntl.c: Search for next free file descriptor rather
	  than assuming the one given is unused.
	* source/unix/unix.c (__alloc_file_descriptor): Allow starting
	  descriptor to be specified.
	  (check_fd_redirection): Use dup2 rather than fcntl so old
	  descriptor gets closed.
	* source/clib/unixlib/fd.h (__alloc_file_descriptor): Add parameter.
	* source/netlib/accept.c: Likewise.
	* source/netlib/socket.c: Likewise.
	* source/unix/open.c: Likewise.
	* source/unix/pipe.c: Likewise.

Sun Nov  6 14:38:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* gen-makefiles.pl: Attempt to strip out incorrect dependencies added
	  by gcc -M.

Mon Oct 10 14:20:00 2005  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe: Misc corrections and updates.
	* source/sys/_swi.s: Correct _swix() output arguments.
	  Fix from Bob Brand.
	* source/unix/mkdir.c: Spot more directory creation
	  failure variants.

Sat Sep 24 22:24:47 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Add an additional check of the command line
	  when searching for a process struct to use (Bug#142).

Sat Sep 24 20:39:23 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/fcntl.c: Close-on-exec flag should be cleared on
	  duplicated file descriptors (Bug#146).

Fri Aug 26 00:12:33 2005  John-Mark Bell  <jmb@netsurf-browser.org>

	* regexp/{COPYRIGHT,regcomp.c,regcustom.h,regc_color.h,regc_cvec.h,
	          regc_lex.h,regc_locale.h,regc_nfa.h,regerror.c,regerrs.h,
	          regexec.c,rege_dfa.h,regfree.c,regguts.h}, clib/regex.h:
	  Import regex implementation from PostgreSQL - this is significantly
	  faster than the existing implementation.
	* regexp/{cclass.h,cname.h,engine.h,regex2.h,utils.h}: Remove redundant
	  files.
	* Docs/Copyright: Add details of regex implementation licencing.

Sun Jul 31 16:17:49 2005  John Tytgat  <John.Tytgat@aaug.net>

	* clib/unixlib/{asm_dec.s,unix.h}, sys/_syslib.s: For some time UnixLib
	  required the FPEmulator so __fpflag is not really needed.  Renamed to
	  __notused1 (and not longer exported) so that we can reuse the space for
	  something else in the future. Renamed GBL_FPFLAG to GBL_NOTUSED1.

Sat Jul 23 13:45:59 2005  Peter Naulls  <peter@chocky.org>

	* common/unixify.c: Fully fix earlier fix.
	* clib/unixlib/os.h, signal/_signal.s: Make __ul_seterr
	  return -1 on error.
	* stdlib/alloc.c: Allow debug version to compile.
	* debug/dvsprintf.c: Use stderr for output once initialised.
	* unix/fcntl.c: Dummy file locking functionality.
	* unix/mkdir.c: Set ENOENT when the RISC OS error is "Not found".

Wed Jul 20 19:27:41 2005  Peter Naulls  <peter@chocky.org>

	* source/common/unixify.c: Correct conversion case when
	  file is in root directory.
	* elf/convert-unixlib.pl: Correct install location for GCC 4.1.

Thu Jul 14 23:29:00 2005  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (__unixinit): Terminating NULL in environment list
	  could sometimes be written outside allocated buffer.

Fri Jul  8 15:34:42 2005  Peter Naulls  <peter@chocky.org>

	* UnixLib 4.2 release.

Fri Jul  8 14:23:04 2005  Peter Naulls  <peter@chocky.org>

	* pthread/keydest.c: Use free_unlocked instead of free to
	  match allocation.
	* sys/brk.c: Fix spelling mistake.
	* unix/unix.c: Convert process filename to Unix format;
	  patch from John Tytgat.

Fri Jun 17 11:05:25 2005  Nick Burrett  <nick@sqrt.co.uk>

	* libm-support/libm.c: New file.

Thu Jun 16 20:44:38 2005  Alex Waugh  <alex@alexwaugh.com>

	* time/utimes.c: Fix time convertion.

Thu Jun 16 14:51:14 2005  Alex Waugh  <alex@alexwaugh.com>

	* pthreads/context.c: Ensure the first thread in the list can
	  be freed when it is idle.

Thu Jun 16 14:24:59 2005  Theo Markettos  <theo@markettos.org.uk>

	* common/riscosify.c: Add support for mapping /home/riscos/env/foo
	  to foo:
	* test/testriscosify.c: Add more tests.

Mon Jun 13 14:55:30 2005  Peter Naulls  <peter@chocky.org>

	* clib/netdb.h: Remove bogus extra AI_PASSIVE.
	* clib/bits/sched.h, clib/pthread.h, clib/sched.h: Arrange
	  things a bit more like glibc (Allows problems with files named
	  sched.h to build).
	* gcccompat/_galloc.s, libm-dbl64/s_isnan.c,
	  incl-local/internal/math.h: Norcroft compatibility.
	* module/sul.s: Increase file handles to 256 as per UnixLib.
	  Bump version to 1.07.
	* source/sys/_syslib.s: Required SharedUnixLibrary 1.07.

Sat May 28 21:52:15 2005  Peter Naulls  <peter@chocky.org>

	* common/unixify.c: Ensure we don't run off the end of the input
	  buffer.
	* clib/errno.h: #define errno as itself, to allow for checks
	  that errno exists to work.
	* clib/sys/ioctl.h: Some TCPIPLibs compatibility (not implemented).

Mon May 16 22:30:29 2005  Peter Naulls  <peter@chocky.org>

	* stdio/fwrite.c (fwrite): Make (v)snprintf with null parameters
	  work properly.  Correct byte count.

Fri May 13 22:17:31 2005  Peter Naulls  <peter@chocky.org>

	* test/pthread/fork.c: Correct spelling.
	* Makefile.in: Stronger warning flags.
	* clib/features.h, libm-dbl64/s_finite.c, libm-flt32/s_finitef.c,
	  search/hsearch.c, search/hsearch_r.c, search/lsearch.c,
	  vfprintf.c: Make code work with new flags
	* stdio/fwrite.c (fwrite): Tidy and correctly return number of
	  items written.
	* stdio/printf (vsnprintf): Correctly terminate buffer.
	* stdio/putc.c (putc_unlocked): Implement new function.

Sat May  7 16:35:02 2005  Nick Burrett  <nick@sqrt.co.uk>

	* features.h (__ULIBC_MINOR__): Bump version to 1.

Sat May  7 16:08:52 2005  Stefan Bellon  <sbellon@sbellon.de>

	* signal/post.c (sigsetup): Casting fixes for Norcroft compatibility
	* sys/exec.c (execve): Likewise.

Sat May  7 10:14:36 2005  Nick Burrett  <nick@sqrt.co.uk>

	Software-floating point support.
	* source/Makefile.in (LIBM_FLAGS): Remove.
	* incl-local/math_private.h (LITTLE_ENDI): Define flags here according
	to value of __FLOAT_WORD_ORDER.
	(HIGH_HALF): Define.
	(LOW_HALF): Define.
	(BIG_ENDI): Define
	* endian.h (__FLOAT_BIT_ORDER): Define.
	(__FLOAT_WORD_ORDER): Define.
	* ieee754.h: Redefine unions according to values of __FLOAT_BIT_ORDER
	and __FLOAT_WORD_ORDER.
	* gdtoa/fpmath.h: Likewise.
	* gdtoa/arith.h: Include endian.h.
	* incl-local/internal/elf-macros.s (__SOFTFP__): Define to zero,
	if not defined.
	* incl-local/internal/math.h: Include endian.h.  Add structures
	to cope with little-endian __FLOAT_WORD_ORDER.
	* libm-dbl64/branred.c: Include <math_private.h> first, drop
	inclusion of endian.h.
	* libm-dbl64/{dosincos.c, e_asin, e_atan2.c, e_exp.c}: Likewise.
	* libm-dbl64/{e_log.c, e_pow.c, e_remainder.c, mpa.c}: Likewise.
	* libm-dbl64/{mpatan.c, mpatan2.c, mpexp.c, mplog.c}: Likewise.
	* libm-dbl64/{mpsqrt.c, mptan.c, s_atan.c, s_sin.c}: Likewise.
	* libm-dbl64/{sincos32.c, slowexp.c, slowpow.c}: Likewise.
	* libm-dbl64/upow.h: Swap ordering of 'static' and 'const'.

	* fenv/fclrexcpt.c: Use __SOFTFP__ rather than __SOFT_FLOAT__.
	* fenv/fedisblxcpt.c: Likewise.
	* fenv/fegetexcept.c: Likewise.
	* fenv/feholdexcpt.c: Likewise.
	* fenv/fesetenv.c: Likewise.
	* fenv/fraiseexcpt.c: Likewise.
	* fenv/fsetexcptflg.c: Likewise.
	* fenv/ftestexcept.c: Likewise.

	* stdlib/alloc.c (malloc): Check for __pthread_system_running
	before enabling/disabling interrupts.
	(free, realloc, memalign, valloc, pvalloc, calloc): Likewise.
	(cfree, malloc_trim): Likewise.

	* bits/signum.h: New file.
	* signal.h: Move all signal number definitions e.g. SIGHUP into
	bits/signum.h.
	(SIG_ERR, SIG_DFL, SIG_IGN, NSIG): Likewise.

Fri May  6 11:54:07 2005  Peter Naulls  <peter@chocky.org>

	* UnixLib 4.1 release.

Fri May  6 10:10:16 2005  Peter Naulls  <peter@chocky.org>

	* clib/sys/select.h: Add NFDBITS constant.
	* sys/_syslib.s: Require SharedUnixLibrary 1.06

Tue May  3 15:56:47 2005  John-Mark Bell  <jmb@netsurf-browser.org>

	* clib/sys/queue.h: Update to more recent version including more
	  queue types.

Mon May  2 14:51:58 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (sul_fork): For consistency, shrink parent pid to
	30-bits.
	* gcccompat/galloca.c: New file for GCC 4 alloca implementation.
	* gcccompat/_galloca.s: New file for GCC 4 alloca implementation.
	* pthread/_exit.s (__pthread_exit): Call __gcc_alloca_thread_free_all.

Mon May  2 14:24:06 2005  Peter Naulls  <peter@chocky.org>

	* fenv/fclrexcpt.c, fenv/fedisblxcpt.c, fenv/egetexcept.c,
	  fenv/feholdexcpt.c, fenv/fesetenv.c, fenv/fraiseexcpt.c,
	  fenv/setexcptflg.c, fenv/testexcept.c: Do nothing interesting
	  when using soft-float.
	* pthread/_context.s: Don't save FP regs when using soft-float
	* sys/_jmp.s: Similarly.
	* sys/_syslib.s: Leave FP status register alone when using soft-float
	* incl-local/internal/aof-macros.s: Add missing END.

Mon May  2 13:45:54 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (alloc_proc): Shrink the stored pid to 30-bits
	to work around applications that test for fork failure by testing
	(pid < 0).
	(sul_fork): Expand/shrink pid to/from 32-bits where necessary.
	(sul_exec): Likewise.
	(sul_exit): Likewise.

Sun May  1 15:54:36 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (help): Move tab char onto seperate line to aid
	ELF conversion script.

Sun May  1 13:17:47 2005  Nick Burrett  <nick@sqrt.co.uk>

	* string/strtok_r.c (strtok_r): Check for a NULL save_ptr.
	* string/stricmp.c (stricmp): Corner case fix.

Sun May  1 11:22:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/strtol.c: Import from FreeBSD libc, includes bug fixes.
	* stdlib/strtoul.c: Likewise.
	* stdlib/atoi.c: New file, split from strtol.c.
	* stdlib/atol.c: New file, split from strtol.c.

Sat Apr 30 16:15:13 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/features.c (__get_program_name): For ELF, dereference weak
	symbol to verify whether it exists.
	* sys/mman.c (mmap): Likewise.

Sat Apr 30 14:55:04 2005  Nick Burrett  <nick@sqrt.co.uk>

	Ease the conversion from AOF to ELF.
	* gcccompat/_divdi3.s: Change local label names to support ELF syntax.
	* gcccompat/_udivdi3.s: Likewise.
	* gcccompat/_moddi3.s: Likewise.
	* gcccompat/_umoddi3.s: Likewise.
	* sys/_jmp.s (__longjmp_fatal_msg): Ease translation to ELF syntax.
	* incl-local/internal/elf-macros.s (macro NAME): Place quotes around
	name.  Move .altmacro directive out of macro.
	* common/_exist.s: Remove quotes from NAME statements.
	* common/_riscosify.s: Likewise.
	* signal/_signal.s: Likewise.
	* sys/_syslib.s: Likewise.

Sat Apr 30 13:32:23 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/asm_dec.s: Move MACRO definitions to aid ELF conversion ...
	* incl-local/internal/aof-macros.s: ... here.
	* incl-local/internal/elf-macros.s: New file, providing ELF versions
	of the AOF macros.

Sat Apr 30 12:36:51 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/__stat.c: Renamed from common/stat.c to avoid filename
	clash with unix/stat.c.

Sat Apr 30 11:14:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/exec.c (execve): Fix call usage of malloc_trim_unlocked.

Fri Apr 29 19:23:19 2005  Peter Naulls  <peter@chocky.org>

	* clib/assert.h: Make NDEBUG work under C++.
	* clib/netdb.h, netlib/getaddrinfo.c: getaddrinfo and friends
	  implementation.

Fri Apr 29 13:43:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Remove double-underscore
	prefix from 'unixlib_stack', 'robase', 'rwlomem', 'rwbase',
	'unixlib_stack_limit' and 'old_himem'.
	Change types for those variables from void* to 'unsigned int'
	as they aren't pointers and it reduces the number of explicit
	casts.
	(__stackalloc_incr_wimpslot): Change parameter types.
	* resource/initialise.c (__resource_initialise): Fix accordingly.
	* resource/ulimit.c (ulimit): Likewise.
	* debug/debug.c (__debug): Likewise.
	* common/funcallerr.c (__funcall_error): Likewise.
	* signal/post.c (sigsetup): Likewise.  Change types for 'low' and
	'high' and 'handler_addr' to unsigned int to avoid a lot of
	unnecessary casts.
	* sys/exec.c (execve): Use new variable names.  Call unlocked
	variant of malloc_trim.
	* sys/stackalloc.c (__stackalloc_incr_wimpslot): Change return
	type to 'unsigned int'.
	(incr_upwards): Renamed from '__stackalloc_incr_upwards'.
	(incr_downards): Renamed from '__stackalloc_incr_downwards'.
	(__stackalloc): Use new function names.

	* math.h (struct exception): Add const qualifier to 'name' to clear up
	compile-time warnings.
	* resolv/resolv.h (struct res_sym): Likewise for 'name' and
	'humanname'.

	Norcroft fixes from Stefan Bellon.
	* pthread/atfork.c: Include malloc.h.
	* pthread/key.c: Include malloc.h.
	* stdlib/alloc.c (malloc_trim): Cast return type of
	malloc_trim_unlocked.

Fri Apr 29 11:02:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	Remove the dual-purpose use of 'rwlomem' and '__unixlib_break'
	for both read/write application memory and dynamic areas.
	* unixlib/asm_dec.s (MEM_RWBREAK, MWM_DABREAK): New constants,
	split from MEM_UNIXLIB_BREAK.
	* unixlib/unix.h (struct ul_memory): Add 'dalomem'
	Remove the ambiguity of '__unixlib_break' by replacing it with
	'rwbreak' and 'dabreak'.
	* debug/debug.c (__debug): Add code to show the dynamic area
	memory limits.
	* resource/initialise.c (__resource_initialise): Use new variables.
	* sys/_syslib.s (__main): Use new variables.  When creating a
	dynamic area, set 'dalomem' and 'dabreak', rather than 'rwlomem'
	and 'unixlib_break'
	(__ul_memory): Add new fields.
	* sys/brk.c (__internal_brk): Delete function, moving code into
	two new functions ...
	(brk_da): ... this one for dynamic areas.  Use new 'da' variables.
	(brk_rw): ... this one for read/write data area in application space.
	(brk): Use new worker functions.
	(sbrk): Likewise.

Thu Apr 28 20:49:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s: Add missing spaces.

Thu Apr 28 13:47:20 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Rename '__image_rw_himem' to
	'appspace_himem'.
	* debug/debug.c: Use 'appspace_himem'.
	* sys/brk.c: Likewise.
	* sys/vfork.c (__fork_post): Likewise.
	* sys/stackalloc.c (__stackalloc_init): Likewise.
	(__stackalloc_incr_upwards): Likewise.
	(__stackalloc_incr_wimpslot): Likewise.
	* unixlib/asm_dec.s (MEM_APPSPACE_HIMEM): Renamed from
	MEM_IMAGE_RW_HIMEM.
	* sys/_syslib.s (__main): Use it.
	(__check_stack): Use it.

Thu Apr 28 12:14:15 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Rename '__unixlib_real_break'
	to 'dalimit'.
	Rename '__unixlib_real_himem' to 'appspace_limit'.

	* sys/brk.c (__internal_brk): Use 'dalimit'.
	Remove 32K check hack as system resource limits are setup before
	the first call to 'brk'.  Add more explanatory comments.
	* unix/unix.c (__unixinit): Call '__resource_initialise' before
	setting up pthreads.
	* unixlib/asm_dec.s (MEM_DALIMIT): Renamed from MEM_UNIXLIB_REAL_BREAK.
	(MEM_APPSPACE_LIMIT): Renamed from MEM_UNIXLIB_REAL_HIMEM.
	* sys/_syslib.s (__main): Use it.  In the non-dynamic area case
	do not set MEM_DALIMIT as it will remain unused throughout the
	execution of the application.
	* sys/_signal.s (__h_cback): Use 'MEM_APPSPACE_LIMIT'.

	* sys/stackalloc.c (__stackalloc_incr_wimpslot): Use 'appspace_limit'.
	If the request for increasing the wimpslot fails, don't adjust
	value of 'appspace_limit'.
	* sys/vfork.c (__fork_pre): Reference globals through '__ul_global'.
	(__fork_post): Use 'appspace_limit'.

Thu Apr 28 10:25:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/post.c (sigsetup): Perform address validation for the
	user supplied signal handler function and the user supplied
	signal stack.
	(extract_name): New function.
	(sigsetup): In DEBUG mode, use 'extract_name' to provide the
	function name of the signal handler, where possible.  Improve
	general debugging information.
	(post_signal): Likewise.

Wed Apr 27 18:38:51 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/asm_dec.s (MEM_RWLOMEM): Renamed from MEM_UNIXLIB_RWLIMIT.
	(MEM_IMAGE_RW_LOMEM): Deleted.
	* unixlib/unix.h (struct ul_memory): Rename __unixlib_rwlimit
	to __rwlomem.
	Delete __image_rw_lomem.
	Constify __robase, __rwlomem and __rwbase as these values should
	never change during the execution of a program.
	* sys/_syslib.s (__main): Fixup accordingly.
	* debug/debug.c (__debug): Use __rwlomem instead of __image_rw_lomem.
	* resource/initialise.c (__resource_initialise): Likewise.
	* resource/ulimit.c (ulimit): Likewise.
	* sys/brk.c (__internal_brk): Likewise.
	(__unixlib_real_break): Delete extern reference.

	* string/_memcpy.s: AREA should be 'C$$code' as the 'C' defines
	the language type for the run-time environment, not the type
	of language used in the source unit.

Wed Apr 27 17:00:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.c (struct ul_global): Move fields __image_rw_himem,
	__unixlib_stack, __robase, __unixlib_rwlimit,
	__image_rw_lomem, __unixlib_break, __unixlib_stack_limit,
	__rwbase, __unixlib_real_break, __unixlib_real_himem and __old_himem
	into new structure 'ul_memory'.
	Delete 'extern' declarations of those variables and therefore
	make them non-exportable.
	Delete '__image_ro_base' and convert all references to use '__robase'.
	* sys/syslib.s (__ul_global): Delete those fields from here and
	remove EXPORT lines.
	(__ul_memory): Declare.
	* unixlib/asm_dec.s (GBL_*): Adjust accordingly.
	(MEM_*): New definitions for referencing fields of 'ul_memory'.
	* common/funcallerr.c: Fix all occurances to the above variables to
	use 'ul_memory' structure and change references of '__image_ro_base'
	to '__robase'.
	* debug/debug.c: Likewise.
	* resource/initialise.c: Likewise.
	* resource/ulimit.c: Likewise.
	* signal/_signal.s: Likewise.
	* sys/_alloca.s: Likewise.
	* sys/_syslib.s: Likewise.
	* sys/_vfork.s: Likewise.
	* sys/exec.c: Likewise.
	* sys/vfork.c: Likewise.
	* sys/brk.c: Likewise and comes with improved code efficiency.
	* sys/stackalloc.c: Likewise.
	(REMOVE_FROM_FREELIST): Convert from a macro to an inline
	function.
	(ADD_TO_FREELIST): Likewise.

Wed Apr 27 12:14:41 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/alloc.c: Cleanup code, remove WIN32 and non-STDC code.
	Re-write public facing functions to disable pthread context
	switching around internal malloc calls.
	Rename functions to be the correct C function names, rather than via
	some macro mangling.
	Drop strange-case in function names, renaming all to lower-case.
	Internal versions of malloc, free, realloc are renamed to an
	unlocked variant.
	(largebin_index): Delete i386 specific code.
	(malloc_init_state): Declare inline.
	(malloc_unlocked): Don't perform malloc initialisation check.
	(malloc_consolidate): Likewise.
	(iALLOc, iCALLOc, iCOMALLOc): Delete functions.
	(mUSABLe, mALLINFo, mSTATs, mALLOPt): Delete functions.
	(__ul_malloc_init): New function.

	* sys/_syslib.s (__main): Call __ul_malloc_init.
	(__ul_global): Add entries for '__mutex' and 'malloc_state'.

	* malloc.h (malloc_unlocked): Add prototype.
	(free_unlocked, realloc_unlocked): Add prototypes.
	(malloc_trim_unlocked): Add prototype.
	(__ul_malloc_init): Add prototype.
	* unixlib/asm_dec.s (GBL_OLD_HIMEM): Add.
	(GBL_MUTEX, GBL_MALLOC_GBL): Add.
	* unixlib/unix.h (struct ul_global): Add definition.
	(__ul_global): Declare.

	* pthread/atfork.c (pthread_atfork): Use __ul_global structure
	and use unlocked variants of malloc rather than SUL malloc.
	* pthread/context.c (__pthread_cleanup_idle): Likewise.
	* pthread/create.c (pthread_create): Likewise.
	* pthread/detach.c (pthread_detach): Likewise.
	* pthread/exit.c (pthread_exit): Likewise.
	* pthread/join.c (pthread_join): Likewise.
	* pthread/newnode.c (__pthread_new_node): Likewise.
	* pthread/pthinit.c (__pthread_prog_init: Likewise.

	* pthread/key.c (pthread_key_create): Use unlocked variants of
	malloc and ensure they are called with interrupts disabled.
	(pthread_key_delete): Likewise.
	(pthread_setspecific): Likewise.

	* debug/dvsprintf.c: Compile without stack-checking.
	* source/Makefile.in (debug/dvsprintf.o): New target.

	* unix/open.c (__open_fh): Type fixes for Norcroft [from Stefan
	Bellon].

Tue Apr 26 23:32:44 2005  John Tytgat  <John.Tytgat@aaug.net>

	* unixlib/dev.h (__getdevtype): Added explicit riscosify control
	parameter (not necessarily equal to the __get_riscosify_control()
	value).
	* unix/dev.c (__getdevtype): Likewise.
	* unix/stat.c: Likewise.
	(__fsclose): Don't close RISC OS filehandle when dflag
	FILE_HANDLE_FROM_OS bit is set.
	* unixlib/fd.h: Added comment.
	* unixlib/local.h (__open_fn): Renamed from __open().
	(__open_fh): Similar call to __open_fn() but instead of a filename,
	this gets a RISC OS file handle (from OS).
	* unix/open.c: Likewise.
	* unix/reopen.c: Likewise.
	* stdio/stdio.c: Capitalised first char of __unixlib_fatal() strings.
	* unix/unix.c: Likewise.
	(initialise_unix_io): Directly use the RISC OS filehandles in case of
	CLI redirection.  This results in a significant speed improvement.

Tue Apr 26 15:20:03 2005  Nick Burrett  <nick@sqrt.co.uk>

	Provide new internal debugging function.
	* sys/debug.h (debug_printf): Add prototype.
	* debug/dvsprintf.c: New file.
	* debug/debug.c: Moved here from sys/debug.c.  Re-written
	to use new 'debug_printf' function.
	* unix/unix.c: Use new debug_printf function.
	* sys/stackalloc.c: Likewise.

Mon Apr 25 19:28:15 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/_mem.s: Delete file.

Mon Apr 25 13:32:29 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* math.h (isinf, isnan): Provide Norcroft specific definitions.
	* sys/cdefs.h (strong_alias): Fix typo in definition.
	* libm-complex/cabs.c: When __UNIXLIB_NO_COMPLEX is defined,
	do not compile functions that use complex types.
	* libm-complex/{cabsf.c, cabsl.c, carg.c, cargf.c}: Likewise.
	* libm-complex/{cargl.c, cimag.c, cimagf.c, cimagl.c}: Likewise.
	* libm-complex/{conj.c, conjf.c, conjl.c, creal.c}: Likewise.
	* libm-complex/{crealf.c, creall.c}: Likewise.
	* libm-generic/{s_cacos.c, s_cacosf.c, s_cacosh.c}: Likewise.
	* libm-generic/{s_cacoshf.c, s_casin.c, s_casinf.c}: Likewise.
	* libm-generic/{s_casinh.c, s_casinhf.c, s_catan.c}: Likewise.
	* libm-generic/{s_catanf.c, s_catanh.c, s_catanhf.c}: Likewise.
	* libm-generic/{s_ccos.c, s_ccosf.c, s_ccosh.c, s_ccoshf.c}: Likewise.
	* libm-generic/{s_cexp.c, s_cexpf.c, s_clog.c, s_clog10.c}: Likewise.
	* libm-generic/{s_clog10f.c, s_clogf.c, s_cpow.c, s_cpowf.c}: Likewise.
	* libm-generic/{s_cproj.c, s_cprojf.c, s_csin.c, s_csinf.c}: Likewise.
	* libm-generic/{s_csinh.c, s_csinhf.c, s_csqrt.c}: Likewise.
	* libm-generic/{s_csqrtf.c, c_ctan.c, s_ctanf.c, s_ctanh.c}: Likewise.
	* libm-generic/{s_ctanhf.c}: Likewise.

	* libm-generic/s_nextafter.c (nexttoward): Disable aliasing hack
	for Norcroft.
	* libm-generic/w_dremf.c (__dremf): ANSIify function definition.

	* libm-dbl64/s_isinf.c: For Norcroft, #undef __isinf.
	* libm-dbl64/s_isnan.c: For Norcroft, #undef __isnan.

	* string/memrchr.c: For Norcroft and LCC, define the double-underscore
	variant of the function name to the variant without.
	* string/strchrnul.c: Likewise.
	* string/strndup.c: Likewise.
	* string/strnlen.c: Likewise.

Sun Apr 24 22:11:02 2005  Alex Waugh  <alex@alexwaugh.com>

	* unix/unix.c (convert_command_line): Prevent >> type redirections
	  getting added to argv.

Sun Apr 24 21:24:36 2005  John Tytgat  <John.Tytgat@aaug.net>

	* sys/resource.h (getpriority): Use id_t instead of int.
	(setpriority): Likewise.
	* resource/getprior.c (getpriority): Likewise.
	* resource/setprior.c (setpriority): Likewise.
	* unixlib/dev.h (__getdevtype): const non-ptr return value doesn't
	make much sense therefore removed const.
	* unix/dev.c: Likewise.
	* unixlib/os.h: Relaxed several prototypes concerning __nonnull.
	* unixlib/sigstate.h (__backtrace_getfp): Return type is now void*
	instead of int*.
	(__ul_callbackfp): Changed type from int* to unsigned int*.
	* unix.h (struct __sul_process): Changed types of maxfd, fdsize,
	fdhandlesize and environ_size from int to unsigned int.
	Removed __OS_ARTHUR & __OS_RISCOS_* defines.
	(__decstrtoui): Changed constify end parameter.
	(__intenv): Decorated prototype with __nonnull and/or __wur.
	(__runtime_features): Likewise.
	(__atomic_modify): Likewise.
	(__unixlib_signal_initialise): Likewise.
	(__resource_initialise): Likewise.
	(__stackalloc): Likewise.
	(__free_stack_chain): Likewise.
	(__stackalloc_incr_wimpslot): Likewise.
	(__free_process): Likewise.
	(__get_program_name): Likewise & also renamed from get_program_name.
	* unix/unix.c (__decstrtoui): Changed constify end parameter.
	* netlib/htons.s (htons): Removed.
	* netlib/htonl.s (ntonl): Removed.
	* netlib/_bswap_16.s: Exported __bswap_16 as htons and ntohs.
	* netlib/_bswap_32.s: Exported __bswap_32 as htonl and ntohl.
	* netlib/getnameinfo.c: Compiler warning fixing.
	* signal/post.c: Likewise.
	* sys/debug.c: Likewise.
	* time/strftime.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/select.c: Likewise.
	* unix/sync.c: Likewise.
	* unix/syslog.c: Likewise.
	* unix/tty.c: Likewise.
	* unix/unlink.c: Likewise.
	* signal/_coredump.s (__backtrace_fp): Add functionname in object code.
	* signal/_signal.s: "Unixlib" -> "UnixLib".
	* sys/_syslib.s: Likewise.
	* unix/custom.c: Likewise.
	* stdio/rename.c (rename): Failure to delete destination file is no
	longer ignored.
	* sys/_os.s: CMP -> TEQ for consistency reasons.
	* sys/mman.c: Rename get_program_name to __get_program_name.
	* unix/features.c: Likewise.
	* unix/getenv.c: 0 -> NULL.
	* unix/nice.c (nice): Added unistd.h include to get nice() prototype.

Sun Apr 24 21:04:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* common/unixify.c: Fix buffer overflow.

Sun Apr 24 12:34:09 2005  Peter Naulls  <peter@chocky.org>

	* clib/dirent.h, clib/grp.h: Make types used visible by including
	  sys/types.h instead.

Sun Apr 24 11:08:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/atoll.c: New file.

Sun Apr 24 10:54:22 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/strtoll.c: Import from FreeBSD, includes bug fixes.
	* stdlib/strtoull.c: Likewise.
	* limits.h: Add namespace visibility for _POSIX and _POSIX2 limits.
	(LLONG_MIN, LLONG_MAX, ULLONG_MAX): New ISO C99 limits.
	(WORD_BIT, LONG_BIT): New limits, defined for XOPEN.

Sat Apr 23 13:14:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* libm-generic/w_lgammal_r.c: Delete file.
	* libm-generic/e_lgammal_r.c: Delete file.
	* complex.h: No implementation for Norcroft or LCC compilers.
	* sys/cdefs.h (__UNIXLIB_NO_COMPLEX): Define for Norcroft and LCC
	compilers.

Sat Apr 23 11:51:31 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* time/setitmr.c (__inline): Renamed from __inline__.
	(__inline__): Delete macro as it is provided in sys/cdefs.h.
	* stdlib/alloc.c (mUSABLe): Compile out prototype.
	(mSTATs, mALLOPt, mALLINFo): Likewise.
	* search/lsearch.c (lfind): Casting fixes.
	(lsearch): Casting fixes.

	* libm-dbl64/s_nexttoward.c: Delete empty file.
	* libm-dbl64/{k_cos.c, k_sin.c, s_cos.c, e_acos.c}: Likewise.

Sat Apr 23 11:42:48 2005  Nick Burrett  <nick@sqrt.co.uk>

	Initial work on accessing internal UnixLib variables through
	one structure -- __ul_global.  Apply small optimisations
	based on a common symbol address.
	* unixlib/asm_dec.s (GBL_*): New definitions.
	* pthread/_context.s (__pthread_start_ticker): Use new __ul_global
	structure.
	(pthread_call_every): Likewise; improve code density.
	(__pthread_callback): Likewise.
	(__pthread_callback_semaphore): Delete.
	(__pthread_system_running): Delete.
	(__pthread_callback_missed): Delete.
	* pthread/_ints.s (__pthread_return_address): Delete.
	(__pthread_worksemaphore): Delete.
	* pthread/_yield.s (pthread_yield): Use __ul_global structure.
	* signal/_signal.s (raise): Use __ul_global structure.
	(__h_cback): Likewise.
	(__h_cback_common): Likewise.
	(__setup_signalhandler_stack): Likewise.
	(__executing_signalhandler): Delete.
	(__signalhandler_sl): Delete.
	(__signalhandler_sp): Delete.
	* pthread/context.c (__pthread_num_running_threads): Delete.
	* sys/_syslib.s (__main): Use 'GBL_' definitions for referencing
	__ul_global.
	(signalhandler_overflow): Likewise.
	(__unixlib_fatal): Likewise.
	(_kernel_fpavailable): Likewise.
	(__upcall_handler_addr): Move into __ul_global structure.
	(__upcall_handler_r12): Likewise.
	(__ul_global): Defined.  Renamed from 'struct_base'.
	(__upcall_handler_addr, __upcall_handler_r12): Define.
	(__pthread_return_address, __pthread_worksemaphore): Define.
	(__pthread_callback_semaphore, __pthread_system_running): Define.
	(__pthread_callback_missed): Define.
	(__pthread_num_running_threads): Define.
	(__executing_signalhandler): Define.
	(__signalhandler_sl, __signalhandler_sp): Define.

	* pthread/atfork.c (pthread_atfork): If called, set
	__pthread_system_running.

Fri Apr 22 15:33:14 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* unixlib/asm_dec.s (__get_errno): Change PTHREADS check to
	__UNIXLIB_ERRNO_THREADED.  Import 'errno' symbol only
	when ERRNO_THREADED is 0.
	(__set_errno): Likewise.
	* sys/_syslib.s (errno): Delete definition as it breaks Norcroft
	assembler.
	* stdlib/errno.c: New file.

	* sys/cdefs.h: Provide Norcroft and LCC specific macro definitions.
	(__SYS_CDEFS_H): Renamed from _SYS_CDEFS_H.
	* features.h: Use __SYS_CDEFS_H.

	* signal/_signal.s (__seterr): Check __pthread_running_thread
	is valid and exit fatally if not.

	* signal/post.c (__valid_address): Delete function.  To preserve
	stack space during signal handling, re-write in assembler.
	* sys/_syslib.s (__valid_address): New function.

	Fix pthread race conditions and improve commentary.
	* pthread/_context.s (__pthread_callback): Check that we are
	actually going to perform a context switch before setting up
	an otherwise unnecessary signal handler stack.  Turn IRQs off
	earlier, therefore setting more internal state without the chance
	of interruption.
	(skip_contextswitch): Fall through rather than using common code
	of the old callback_return.
	* pthread/newnode.c (__pthread_new_node): Use SUL memory functions
	for allocating space for pthread structure to prevent a race
	condition between 'free' and __pthread_cleanup_idle.
	* pthread/contex.c (__pthread_cleanup_idle): Use the SUL memory
	functions.
	* pthread/create.c (pthread_create): Don't call __pthread_init.
	Set __pthread_system_running directly.  Use SUL memory functions.
	* pthread/detach.c (pthread_detach): Use SUL memory functions.
	* pthread/exit.c (pthread_exit): Enable interrupts around call
	to __pthread_exit to prevent possible assertion failure when
	freeing 'alloca' chains.
	* pthread/join.c (pthread_join): Use SUL memory functions.
	* pthread/pthinit.c (__pthread_prog_init): Allocate 'saved_context'
	memory here.
	(__pthread_init): Delete function and move useful functionality
	into __pthread_prog_init.
	* pthread.h (__pthread_init): Delete prototype.

	Compilation fixes.
	* common/fdname.c (__fd_to_name): Add explicit cast for malloc.
	* common/riscosify.c (__sfixinit): Likewise.
	* common/unixify.c (__unixify): Likewise.
	* crypt/crypt-entry.c: Convert function definitions to ISO-C form.
	* crypt/crypt_util.c: Likewise.
	(_ufc_clearmem, _ufc_copymem): Ensure we use 'memset' and 'memcpy'
	rather than slow internal versions.
	* crypt/md5-crypt.c: Convert function definitions to ISO-C form.
	(b64t): Fix array size.
	* crypt/md5.c: Convert function definitions to ISO-C form.
	* gdtoa/dmisc.c (nrv_alloc): Constify 's'.
	* gdtoa/gdtoaimp.h (nrv_alloc): Fix prototype accordingly.

Fri Apr 22 09:32:50 2005  Nick Burrett  <nick@sqrt.co.uk>

	* dirent.h (alphasort): Change to BSD and MISC visibility.

Thu Apr 21 16:53:32 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* libm-dbl64/tbl_asincos.h: Renamed from asincos.tbl.
	* libm-dbl64/tbl_powtwo.h: Renamed from powtwo.tbl
	* libm-dbl64/tbl_root.h: Renamed from root.tbl
	* libm-dbl64/tbl_sincos.h: Renamed from sincos.tbl
	* libm-dbl64/tbl_uatan.h: Renamed from uatan.tbl
	* libm-dbl64/tbl_uexp.h: Renamed from uexp.tbl
	* libm-dbl64/tbl_ulog.h: Renamed from ulog.tbl
	* libm-dbl64/tbl_upow.h: Renamed from upow.tbl
	* libm-dbl64/tbl_utan.h: Renamed from utan.tbl
	* libm-dbl64/dosincos.c: Use new filenames.
	* libm-dbl64/{e_asin.c, e_atan2.c, e_exp.c, e_log.c}: Likewise.
	* libm-dbl64/{e_pow.c, e_sqrt.c, s_atan.c, s_sin.c}: Likewise.
	* libm-dbl64/s_tan.c: Likewise.

	* unixlib/buildoptions.s: Commit auto-generated file.

Thu Apr 21 16:02:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* pthread/sem.c (sem_check_validity): New function.
	(sem_alloc): Delete function; incorporate into sem_init.
	(sem_init): 'sem' is already allocated memory; use it rather than
	making our own internal allocation with malloc.
	(sem_free): No need to free sem structure here.  Make inline.
	(sem_destroy): Always check for errors using sem_check_validity.
	(sem_trywait): Likewise.
	(sem_post): Likewise.
	(sem_getvalue): Likewise.
	(sem_wait): Likewise.  Cope with an empty usem_waiters queue.
	Add PTHREAD_SAFE_CANCELLATION.

Wed Apr 20 18:10:04 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stpcpy.c: Move into string subdirectory.
	* stpncpy.c, strcat.c, strchr.c, strcmp.c, strcspn.c: Likewise.
	* strdup.c, strichr.c, stricmp.c, strncat.c: Likewise.
	* strncmp.c, strncpy.c, strnicmp.c, strpbrk.c: Likewise.
	* strrchr.c, strrichr.c, strsep.c, strsignal.c: Likewise.
	* strspn.c, strstr.c, strtok.c, strtok_r.c: Likewise.
	* strtol.c, strtoll.c, index.c, memccpy.c: Likewise.
	* memchr.c, memcmp.c: Likewise.

	* strtoumax.c: Move into inttypes subdirectory.
	* strtoimax.c: Likewise.

	* strtol.c: Move into stdlib subdirectory.
	* strtoll.c, strtoul.c, strtoull.c: Likewise.
	* abort.c, atexit.c, bsearch.c, div.c, qsort.c: Likewise.
	* alloc.c, system.c: Likewise.

	* assert.c: Move into assert subdirectory.

	* ctype.c: Move into ctype subdirectory.
	* ctypeproc.c: Likewise.

	* opensock.c: Move into resolv subdirectory.

	* psignal.c: Move into signal subdirectory.

	* termcap.c: Move into termios subdirectory.

Wed Apr 20 17:54:40 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdio/vfprintf.c (__vfprintf): Output of printf("%#.0o", 0)
	should print 0.
	* stdio/fwrite.c (fwrite): When handling fd of -1, return early
	if we have no space in the output buffer.
	* signal/post.c (__write_backtrace): Account for 26-bit mode
	when disassembling.

Wed Apr 20 14:15:44 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* stdio.h (__vfprintf): Add prototype.
	* stdio/vfprintf.c (__find_arguments [TP_SIZET]): Use 'size_t'
	[from Stefan Bellon].
	* stdio/printf.c (vsnprintf): Remove '__' from function name.
	(vsprintf, snprintf, sprintf): Likewise.
	(vprintf, fprintf, printf): Likewise.
	* internal/math.h: Add macros to remove the double-underscores
	from function.
	* libm-generic/s_fma.c: Include math_private.h to pick up this change.
	* libm-generic/s_fmaf.c: Likewise.
	* libm-generic/s_fdim.c: Likewise.
	* libm-generic/s_fdimf.c: Likewise.
	* libm-generic/s_fmax.c: Likewise.
	* libm-generic/s_fmaxf.c: Likewise.
	* libm-generic/s_fmin.c: Likewise.
	* libm-generic/s_fminf.c: Likewise.
	* libm-generic/s_cacos.c: Likewise.
	* libm-generic/s_cacosf.c: Likewise.
	* libm-generic/s_casin.c: Likewise.
	* libm-generic/s_casinf.c: Likewise.
	* libm-generic/s_casinh.c: Likewise.
	* libm-generic/s_casinhf.c: Likewise.
	* libm-generic/s_ccos.c: Likewise.
	* libm-generic/s_ccosf.c: Likewise.
	* libm-generic/s_cpow.c: Likewise.
	* libm-generic/s_cpowf.c: Likewise.
	* libm-generic/s_cproj.c: Likewise.
	* libm-generic/s_cprojf.c: Likewise.
	* libm-generic/s_nan.c: Likewise.
	* libm-generic/s_nanf.c: Likewise.
	* libm-generic/w_drem.c: Likewise.

	* sys/types.h (ino_t): Define.
	* dirent.h (ino_t): Only define if __USE_XOPEN.

	* unixlib/buildoptions.h: Add comment to remind us why defining
	__UNIXLIB_ERRNO_THREADED is a bad idea.

Tue Apr 19 19:52:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* iconv.h (EILSEQ): Kill definition.

Tue Apr 19 19:28:59 2005  Nick Burrett  <nick@sqrt.co.uk>

	Make threaded 'errno' a compile time option.
	* unixlib/buildoptions.h (__UNIXLIB_ERRNO_THREADED): Define as zero.
	* pthread/context.c (__pthread_context_switch): When above
	macro is zero, save the global errno between context switches.
	* errno.h (errno): Only use the threaded version if
	__UNIXLIB_FEATURE_PTHREADS and __UNIXLIB_ERRNO_THREADED are
	non-zero.
	* sys/_syslib.s (errno): Define if __UNIXLIB_ERRNO_THEADED is
	non-zero.

Tue Apr 19 09:48:33 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* unixlib/asm_dec.s (__set_errno): IMPORT __pthread_running_thread.
	(__get_errno): Likewise.
	* signal.h (sigpause): Fix comment termination typo.
	* common/riscosify.c (sfix_hash): Use __inline for Norcroft
	compatibility.
	* locale/iconv.c: Change ordering of includes.
	(iconv_open): Add explicit cast to return value.
	* stdio/asprintf.c: Include stdio.h
	(asprintf): Renamed from __asprintf.
	* stdio/vasprintf.c (vasprintf): Renamed from __vasprintf.
	* sys/_syslib.s (errno): Fix __UNIXLIB_FEATURE_PTHREADS check.
	* stdlib/atof.c: New file.

Mon Apr 18 22:25:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/stdcmac.h: Delete file.
	* unixlib/stdsmac.s: Delete file.
	* unixlib/buildoptions.h: Reformat and remove 'COMMENT' and 'END'.
	* source/Makefile.in (clib/unixlib/buildoptions.s): New target.
	* unixlib/asm_dec.s: Use it rather than buildoptions.h
	* gen-makefiles.pl: For assembler files, depend on buildoptions.s.

	* pthread/context.c (__pthread_context_switch): Don't save/restore
	global errno between contexts.

Mon Apr 18 20:40:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* errno.h: Use correct path to features.h.
	* features.h: Move the inclusion of unixlib/stdcmac.h and
	unixlib/buildoptions.h outside of __UNIXLIB_INTERNALS.

Mon Apr 18 20:27:21 2005  Nick Burrett  <nick@sqrt.co.uk>

	* errno.h: Change #ifdef to #if for __UNIXLIB_FEATURE_PTHREADS.

Mon Apr 18 18:03:56 2005  Nick Burrett  <nick@sqrt.co.uk>

	Make 'errno' thread local.
	Add option to __seterr to prevent the setting of 'errno',
	rename to __ul_seterr and update all callers.
	* signal/_signal.s (__ul_seterr): Renamed from '__seterr'.
	If 'a2' is non-zero, then do not set errno.
	Perform NULL-check on __pthread_running_thread.
	* unixlib/os.h (__ul_seterr): Add seterrno parameter to prototype.
	* unixlib/asm_dec.s (__set_errno): For thread support, use the
	local thread errno rather than the global errno.
	(__get_errno): Likewise.
	* errno.h (__set_errno): Likewise.
	* errno.c: Delete file.
	* sys/_syslib.s (errno): Define when not compiling with thread
	support.

	* pthread/pthinit.c (__pthread_prog_init): Die if __pthread_new_node
	fails.

	* gdtoa/gdtoaimp.h (ACQUIRE_DTOA_LOCK): Check __pthread_system_running
	rather than __pthread_running_thread.
	(FREE_DTOA_LOCK): Likewise.

	* common/fdname.c (__fd_to_name): Don't set errno.
	* common/objattr.c (__object_get_attrs): Likewise.
	(__object_set_attrs): Likewise.
	* locale/iconv.c (iconv_error): Likewise.
	* netlib/_net_error.s (__net_error): Likewise.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsfsstat): Likewise.
	* unix/dirent.c (readdir_r): Likewise.
	* unix/fchmod.c (fchmod): Likewise.
	* unix/rmdir.c (rmdir): Likewise.

	* locale/iconv.c (iconv_open): Set errno.
	* sound/dsp.c (__dspopen): Likewise.
	(__dspwrite): Likewise.
	* sys/mman.c (munmap): Likewise.
	(mremap): Likewise.
	* time/clk_gettime.c (clock_gettime): Likewise.
	* time/gettod.c (gettimeofday): Likewise.
	* time/time.c (time): Likewise.
	* unix/chdir.c (chdir): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	(__fsclose, __fsread, __fswrite, __fslseek): Likewise.
	(__randomopen, __randomread): Likewise.
	* unix/dirent.c (newstream): Likewise.
	* unix/getcwd.c (getcwd): Likewise.
	* unix/getenv.c (__getenv_from_os): Likewise.
	* unix/gethostnam.c (fakehostname): Likewise.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/setenv.c (__addenv_to_os): Likewise.
	* unix/sync.c (fsync): Likewise.
	* unix/truncate.c (ftruncate): Likewise.
	(truncate): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* scl/_kswi.s: Likewise.
	* scl/_ksetenv.s: Likewise.
	* scl/_kosrdch.s: Likewise.
	* scl/_kosgbpb.s: Likewise.
	* scl/_kosfind.s: Likewise.
	* scl/_kosfile.s: Likewise.
	* scl/_koscli.s: Likewise.
	* scl/_kosbyte.s: Likewise.
	* scl/_kosargs.s: Likewise.
	* scl/_kgetenv.s: Likewise.
	* scl/_kernel.s: Likewise.

	* unix/unix.c (__unixinit): Drop call to '__seterr'.
	* scl/_kosbput.s: Likewise.
	* scl/_kosbyte.s: Likewise.

	* unix/rename.c (rename): Set 'errno'.  Don't need to preserve 'errno'
	across function.

	* sys/mman.c (__munmap_all): Remove PTHREAD_UNSAFE as the thread
	system should not be running at this time.

	* scl/_koswrch.s: Delete file.
	* scl/_kosword.s: Delete file.
	* sys/_os.s (__os_vdu): Define _kernel_oswrch to the same function.
	Set return value to zero on success.
	(__os_word): Simarly for _kernel_osword.

Mon Apr 18 14:44:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/getpagesiz.s: Delete file.
	* unistd/getpagesiz.c: New file.
	* sys/_syslib.s (__main): Call XOS_ReadMemMapInfo and store the
	system page size.
	(__ul_pagesize): Define.
	* unixlib/unix.h (__ul_pagesize): Declare.
	* sys/mman.c (page_size): Delete.
	(page_align): Define in terms of __ul_pagesize.
	(mmap): Don't call 'getpagesize', use the internal variable directly.
	* unix/sysconf.c (sysconf): Likewise.
	* alloc.c (malloc_getpagesize): Use __ul_pagesize.

	Make the malloc functions thread safe.
	* alloc.c (USE_MALLOC_LOCK): Define.
	(MALLOC_PREACTION): Check pthread system is running first.
	(MALLOC_POSTACTION): Likewise.
	(mALLOc): Delete PTHREAD_UNSAFE.
	(fREe): Likewise.
	(rEALLOc): Likewise.
	(mEMALIGn): Likewise.
	(cALLOc): Likewise.
	(iALLOc): Likewise.
	(vALLOc): Likewise.
	(pVALLOc): Likewise.
	(mTRIm): Likewise.

Mon Apr 18 12:26:48 2005  Peter Naulls  <peter@chocky.org>

	* source/unix/rmdir.c, clib/unixlib/unix.h: Improve language.
	* clib/unixlib/dev.h, source/unix/custom.c: Add a function to
	  hide some internal structures from programs trying to override
	  file descriptor handling.

Thu Apr 14 23:59:26 2005  John-Mark Bell  <jmb@netsurf-browser.org>

	* endian.h: Update missed file

Thu Apr 14 17:01:30 2005  Nick Burrett  <nick@sqrt.co.uk>

	* search.h: New file.
	* search/insremque.c: New file.
	* search/lsearch.c: New file.
	* search/hsearch.c: New file.
	* search/hsearch_r.c: New file.
	* search/tsearch.c: New file.

	* signal.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* time.h: Likewise.
	* pthread/pthsignal.c (sigwait): Mark as a safe cancellation point.

Thu Apr 14 16:15:32 2005  Nick Burrett  <nick@sqrt.co.uk>

	* clib/unixlib/swiparams.h: Move file ...
	* incl-local/internal/swiparams.h: ... here.

	* clib/unixlib/tty.h: Move file ...
	* incl-local/internal/tty.h: ... here.

	* common/objattr.c: Use new swiparams.h location.
	* common/riscosify.c: Likewise.
	* common/unixify.c: Likewise.
	* sound/dsp.c: Likewise.
	* stdio/rename.c: Likewise.
	* unix/chmod.c: Likewise.
	* unix/custom.c: Likewise.
	* unix/dev.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/fchmod.c: Likewise.
	* unix/fstat.c: Likewise.
	* unix/mkdir.c: Likewise.
	* unix/rmdir.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/unix.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Likewise.

	* unixlib/unix.h: Use new tty.h location.
	* unix/tty.c: Likewise.

Thu Apr 14 15:26:01 2005  Nick Burrett  <nick@sqrt.co.uk>

	Import an accurate IEEE math library
	* bits/fenv.h: New file.
	* bits/huge_valf.h: New file.
	* bits/huge_vall.h: New file.
	* bits/huge_val.h: Split into its constituent parts.
	* bits/inf.h: New file.
	* bits/nan.h: Use builtin for GCC 3.3 and later.
	* bits/cmathcalls.h: Bring in line with new math library.
	* bits/mathcalls.h: Likewise.
	* bits/mathdef.h: Likewise.
	* bits/mathinline.h: Likewise.
	* fenv.h: Likewise.
	* math.h: Likewise.
	* complex.h: Likewise.
	* fpu_control.h: New file.
	* ieee754.h: Moved here from machine/ieee754.h.
	* endian.h: Moved here from machine/endian.h.

	* complex: Delete directory.
	* math: Delete directory.
	* math-asm: Delete directory.

	* fenv: New directory.
	* libm-complex: New directory.
	* libm-dbl64: New directory.
	* libm-flt32: New directory.
	* libm-generic: New directory.
	* libm-support: New directory.

	* fpu_control.h (__unixlib_get_fpstatus): Moved here from
	unixlib/unix.h.
	(__unixlib_set_fpstatus): Likewise.
	* unixlib/unix.h: Delete above prototypes.

	* incl-local: New directory.  Container for all UnixLib build
	specific header files.
	* incl-local/README: New file.
	* incl-local/math_private.h: New file, for source code compatibility
	with main libm library.
	* incl-local/internal/math.h: Renamed from unixlib/math.h
	and updated for new IEEE math library.

	* Makefile.in (INCLUDES): Use 'incl-local'.
	(LIBM_FLAGS): Define.
	(CROSS_CFLAGS): Include LIBM_FLAGS.
	(WARNINGS): Drop -Wno-long-long.
	* gen-makefiles.pl (find_headers): Support multiple include dirs.
	Search 'incl-local' for headers.

	* clib/stdio_ext.h: Delete file.
	* incl-local/stdio_ext.h: New blank file.
	* clib/stdio-common/stdio_ext.h: Delete file.

	* unixlib/os.h (__os_swi): Remove __wur.
	(__os_byte): Remove __nonnull and __wur.

Thu Apr 14 13:12:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* grp.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* kernel.h: Likewise.
	* locale.h: Likewise.
	* nl_types.h: Likewise.
	* pwd.h: Likewise.
	* unixlib/os.h: Likewise.
	* semaphore.h: Likewise.

	* locale/iconv.c (iconv_open): Add PTHREAD_SAFE_CANCELLATION.
	Use __os_swi rather than _swix.  Specify a minimum module version
	of 0.04.
	(iconv): Likewise.
	(iconv_close): Likewise.

	* grp/fgetgrent.c (fgetgrent): Add PTHREAD_UNSAFE_CANCELLATION.
	* grp/getgrgid.c (getgrgid): Likewise.
	* grp/getgrnam.c (getgrnam): Likewise.
	* grp/fgetgrentr.c (fgetgrentr): Add PTHREAD_SAFE_CANCELLATION.
	* grp/getgrgid_r.c (getgrgid_r): Likewise.
	* grp/getgrnam_r.c (getgrnam_r): Likewise.
	* grp/getgrent.c (getgrent): Add PTHREAD_UNSAFE_CANCELLATION.
	(setgrent): Likewise.
	(endgrent): Likewise.
	(getgrent_r): Mark as a safe cancellation point.
	* grp/getgroups.c (initgroups): Change to PTHREAD_UNSAFE_CANCELLATION.
	(getgroups): Likewise.
	* pwd/fgetpwent.c (fgetpwent): Mark as an unsafe cancellation point.
	* pwd/getlogin.c (getlogin): Likewise.
	* pwd/fgetpwentr.c (fgetpwentr): Mark as a safe cancellation point.
	* pwd/getpwnam_r.c (getpwnam_r): Likewise.
	* pwd/getpwuid_r.c (getpwuid_r): Likewise.
	* pwd/getpwent.c (getpwent_r): Likewise.
	(getpwent): Make as an unsafe cancellation point.
	(endpwent): Likewise.
	(setpwent): Likewise.
	* pwd/getpwnam.c (getpwnam): Likewise.
	* pwd/getpwuid.c (getpwuid): Likewise.
	* pwd/putpwent.c (putpwent): Likewise.

	* stdio.h (struct __iobuf): Add 'lock' as a placeholder for
	multithreaded I/O support.
	(fgets): Fix definition.
	* stdio/fgets.c (fgets): Fix function definition.

	* pthread.h (struct __pthread_thread): Rename 'param' to '__param'.
	Add '__policy'.
	(pthread_getschedparam): Fix prototype.
	* pthread/schedparam.c (pthread_getschedparam): Fix function
	definition and get thread policy.
	(pthread_setschedparam): Set thread policy.

	* ulimit.h (ulimit): Correct prototype.
	* resource/ulimit.c (ulimit): Function takes a variable number
	of args.  Adjust accordingly.

	* unistd.h (sync): Function never returns a result
	* unix/sync.c (sync): Don't bother with any errors returned
	by __os_args call.
	(fsync): Mark that this is a cancellation point.

	* dirent.h (ino_t): Define here.
	* sys/types.h (ino_t): Remove definition from here.

	* abs.c: Delete file.
	* stdlib/abs.c: New file.
	* stdlib/labs.c: New file.
	* stdlib/llabs.c: New file.

	* pthinit.c: Renamed from init.c for ELF compatibility.
	* pthsignal.c: Renamed from signal.c for ELF compatibility.

Wed Apr 13 20:17:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/cdefs.h (__NTH): Declare for non-GCC compilers.
	(__attribute_warn_unused_result__): Declare.
	(__wur): Declare (shorthand for above).

	* string.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* sys/stat.h: Likewise.
	* sys/select.h: Likewise.
	* sys/resource.h: Likewise.
	* netdb.h: Likewise.
	* crypt.h: Likewise.
	* dirent.h: Likewise.
	* fcntl.h: Likewise.
	* setjmp.h: Likewise.
	* stdio.h: Likewise.
	* stdlib.h: Likewise.
	* unistd.h: Likewise.

	* sys/resource.h (ulimit): Remove declaration.
	(nice): Likewise.
	* ulimit.h: New file.
	* unistd.h (nice): Add prototype.
	* resource/ulimit.c: Include ulimit.h.

	* alloca.h (alloca): Remove __THROW.  Add GCC variant.
	* assert.h (assert): Add noreturn attribute.
	(__ASSERT_CAST): Define with better C++ support.
	(assert): Use it.

	* ctype.h (isascii): Set visibility for SVID, MISC and XOPEN only.

	* iconv.h: Don't include errno.h.
	(iconv): Add 'restrict' to certain parameters.
	* locale/iconv.c: Include errno.h.

	* sys/select.h (__NFDBITS): Rename from NFDBITS.  Define sizeof
	in terms of variable name, rather than type.
	(__FDELT): Rename from FDELT.
	(__FDMASK): Rename from FDMASK.
	(__fd_set): Fix according to new macro names.
	(FD_SET): Likewise.
	(FD_CLR): Likewise.
	(FD_ISSET): Likewise.
	(fd_mask): Only define if __USE_MISC.
	(select): Add C99's 'restrict' qualifier.
	(pselect): Likewise.

	* sys/stat.h (struct stat): Change the types of 'st_blksize'
	and 'st_blocks'.

	* sys/time.h (timeradd): Define.
	(timersub): Define.

	* unix/dirent.c (opendir): Mark as an unsafe cancellation point.
	(readdir_r): Likewise.
	(readdir): Likewise.
	(closedir): Likewise.
	(scandir): Likewise.

	* features.h (BSD): Undefine.
	(__builtin_expect): Only undefine for non-GCC compilers.
	(__GLIBC_PREREQ): Delete macro.
	(__ULIBC_PREREQ): Define macro.
	* resolv/gethnamaddr.c (BSD): Define.

	* pthread.h: Make compatible with C++.
	(pthread_setschedparam): Add prototype.
	(pthread_getschedparam): Add prototype.
	(struct __pthread_thread): Add 'param'.
	* schedparam.c: New file.

	* time/time.c (time): Fix shadow parameter warning.
	* time/setitmr.c (add_ticker): Likewise.
	(check_ticker): Likewise.
	* resource/getrusage.c (getrusage): Likewise.
	* time/strftime.c (strftime): Likewise.
	(territory_convert): Adjust prototype to reduce warnings.
	(territory_standard): Likewise.
	* signal/post.c (__write_backtrack): Fix printf warnings.
	* crypt/crypt.c (_ufc_doit_r): Use ANSI-style declarations.
	* common/unixify.c (__unixify): Add parenthesis to resolve an
	ambiguity.
	* bsearch.c (bsearch): Fix warnings.

Fri Apr  8 23:31:14 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unixlib/unix.h (__escape_disabled): Define variable.
	* source/unix/unix.c: Record if the escape key is disabled on
	  program initialisation.
	* source/sys/vfork.c: Disable escape on return to parent if necessary.
	* source/unix/tty.c (__tty_console_gterm, __tty_console_sterm): Don't
	  alter escape status if it was disabled.
	  (__tty_console_swinsz): Don't set the text window size when running
	  in a taskwindow.

Fri Apr  8 20:20:41 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/attrib.c (__set_protection): When translating,
	take into account group ownerships.
	(__get_protection): Likewise.

Fri Apr  8 20:12:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* string/_ffs.s (ffs): Be a 'ffs' rather than a 'clz' algorithm.

Fri Apr  8 18:02:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	Improve accuracy of converting IEEE numbers to ASCII, fix
	many formatting errors in printf and add C99 conformance.

	* gdtoa/{arith.h, fpmath.h, gdtoa.h, gdtoaimp.h}: New files.
	* gdtoa/{dmisc.c, dtoa.c, g_ddfmt.c, g_dfmt.c}: New files.
	* gdtoa/{gdtoa.c, gethex.c, g_ffmt.c, g__fmt.c}: New files.
	* gdtoa/{glue.c, gmisc.c, g_Qfmt.c, g_xfmt.c}: New files.
	* gdtoa/{g_xLfmt.c, hd_init.c, _hdtoa.c, hexnan.c}: New files.
	* gdtoa/{_ldtoa.c, misc.c, smisc.c, strtod.c}: New files.
	* gdtoa/{strtodg.c, strtodI.c, strtof.c, strtoId.c}: New files.
	* gdtoa/{strtoIdd.c, strtoIf.c, strtoIg.c, strtoIQ.c}: New files.
	* gdtoa/{strtoIx.c, strtoIxL.c, strtopd.c, strtopdd.c}: New files.
	* gdtoa/{strtopf.c, strtopQ.c, strtopx.c, strtopxL.c}: New files.
	* gdtoa/{strtord.c, strtordd.c, strtorf.c, strtorQ.c}: New files.
	* gdtoa/{strtorx.c, strtorxL.c, sum.c, ulp.c}: New files.
	* gdtoa/README: New file.

	* strtod.c: Remove file.  Replaced by the gdtoa library.
	* stdlib/strtof.c: Likewise.

	* stdio/vfprintf.c: New file, taken from FreeBSD libc.
	* stdio/printf.c (vfprintf): Delete function.
	* stdio/floatio.h: New file.

	* stdio/fwrite.c (fwrite): Special handling of a file descriptor
	of -1, for new vfprintf function.

	* stdio/asprintf.c: New file.
	* stdio/vasprintf.c: New file.
	* stdio.h (vasprintf): Add prototype.
	(asprintf): Add prototype.

	* bits/nan.h (NAN): For GCC 3.3 and later, use the builtin.
	* bits/byteswap.h: Re-enable __bswap_64.
	* string/byteswap.h (__BYTESWAP_H): Renamed from _BYTESWAP_H for
	consistency with other header files.

	* stdio.h (vfprintf): Remove __THROW on functions that are
	cancellation points.
	(vfprintf): Likewise.
	(fprintf): Likewise.
	(printf): Likewise.
	(fscanf): Likewise.
	(vscanf): Likewise.
	(vfscanf): Likewise.
	* unistd.h (sleep): Likewise.
	(usleep): Likewise.

Thu Apr  7 19:44:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* features.h (__STDC_ISO_10646__): Don't use C99 comments.
	(___program_name): Don't define if compiling for ELF.
	(___dynamic_da_name): Likewise.
	(__program_name): If compiling for ELF, then add WEAK attribute.
	(__dynamic_no_da): Likewise.
	(__dynamic_da_name): Likewise.
	(__dynamic_da_max_size): Likewise.

	* unixlib/buildoptions.h (__UNIXLIB_ELF): Define, temporarily.

	* sys/_syslib.s (no_dynamic_area): Don't reserve 128 bytes of
	stack for Objective-C.
	(___program_name): If compiling for ELF, then don't export.
	(___dynamic_da_name): Likewise.
	(___dynamic_da_max_size): Likewise.
	(___dynamic_no_da): Likewise.
	(__check_chunk_l2): Use MOV rather than old 'return' MACRO.
	(__unixlib_fatal_got_msg): Use SWI calls direct.
	(__robase): Provide ELF alternative.
	(__unixlib_rwlimit): Likewise.
	(__rwbase): Likewise.

	* sys/mman.c (__munmap_all): Provide ELF alternative for accessing
	__dynamic_da_name.
	* unix/features.c (get_program_name): Similarily for __program_name.

Thu Apr  7 19:37:19 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/riscosify.c (__sdirinit): Use __os_swi rather than
	_kernel_swi.

Thu Apr  7 19:36:09 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/_os.s (__os_prhex): Build buffer directly.
	(__os_setfiletype): New function.

	* sys/os.h (__os_setfiletype): Add prototype.

Thu Apr  7 19:33:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/unix.c (convert_command_line): Cope with arguments that
	are effectively empty strings.

Thu Apr  7 19:31:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/cdefs.h (__nonnull): Define.
	(__THROW): Update for later GCC releases.
	(__NTH): Likewise.
	(strong_alias): Define.
	(weak_alias): Define.
	(hidden_def): Define.
	(libm_hidden_def): Define.
	(INTDEF): Define.
	* stdlib.h (atof): Remove __THROW from inline version.
	(atoi): Likewise.
	(atol): Likewise.
	(atoll): Likewise.
	* math/llrintf.c: Fix weak_alias decl.
	* math/lrintf.c: Likewise.
	* resolv/inet_addr.c: Likewise.
	* netlib/getpeernam.c (getpeername): Remove __THROW from decl.
	* sys/mount.c (mount): Likewise.
	(umount): Likewise.
	(umount2): Likewise.

Wed Apr  6 21:10:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (opendir): Remove check on whether
	  __riscosify returned a filetype.

Tue Apr  5 22:30:34 2005 Peter Naulls  <peter@chocky.org>

	* source/string/_memset.s: Fixed version of Adrian's memset.
	* source/clib/unixlib/dev.h, source/unix/custom.c,
	  source/unix/dev/c: Custom device handling.

Tue Apr  5 22:09:32 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/termios/tcdrain.c (tcdrain): Remove ioctls that have
	  no effect.
	* source/termios/tcgetattr.c (tcgetattr): Use a single ioctl to get
	  the attrs directly and avoid loss in converting between formats.
	* source/termios/tcsetattr.c (tcsetattr): Likewise.

Mon Apr  4 19:37:26 2005 Peter Naulls  <peter@chocky.org>

	* source/string/_memset.s: Revert; Adrian's version seems to have
	  problems.

Mon Apr  4 12:57:46 2005 Peter Naulls  <peter@chocky.org>

	* source/memcpy.c, source/memset.c: Removed - bzero, bcopy
	  included in assembler.
	* source/string/_strcpy.s, source/string/_strlen.s: Adrian
	  says cache alignment may improve performance.
	* source/sys/_memset.s: Removed
	* source/string/_memset.s, source/string/_memcpy.s: Faster
	  implementations from Adrian Lees.
	* source/signal/post.c: Experiment with provding disassembly
	  in backtrace.

Sat Apr  2 22:03:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (readdir_r): Take account of
	  __feature_imagefs_is_file.

Sat Apr  2 09:28:42 2005  Stefan Bellon <sbellon@sbellon.de>

	* source/sys/debug.c: Fix compile error.
	* objs/.cvsignore: Add more filenames to ignore.

Fri Apr  1 17:05:51 2005  Peter Naulls  <peter@chocky.org>

	* source/strcpy.c, source/strlen.c: Removed
	* source/string/_strcpy.s, source/string/_strlen.s: New
	  faster versions from Adrian Lees.
	* source/unix/dev.c: Remove old free call.

Thu Mar 31 13:55:25 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sched.h (sched_yield): Add prototype.
	* sched/syield.c: New file.

	* Makefile.in (CROSS_CFLAGS): Set compiler to the C99 standard.

Thu Mar 31 13:50:43 2005  Nick Burrett  <nick@sqrt.co.uk>

	* setlocale.c (setlocale): Only build ctype tables when they
	are actually being changed.

Thu Mar 31 12:38:23 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/sleep.c (nanosleep): New function.
	* time.h (nanosleep): Add prototype.

Thu Mar 31 12:26:20 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/dev.c (__fsopen): Reduce OS_FSControl canonicalisation
	calls by using a fixed buffer from the stack.

Thu Mar 31 10:52:14 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/post.c (__unixlib_raise_signal): Remove PROCMAGIC
	check.

Thu Mar 31 10:44:49 2005  Nick Burrett  <nick@sqrt.co.uk>

	* locale/localeconv.c (xfree): New function.
	(struct lonv lc): Initialise correctly.
	(localeconv): Use 'xfree' instead of 'free'.
	(read_byte_list): Remove DEBUG code because it is incompatible
	and can cause recursion with 'printf'.

Thu Mar 31 10:37:49 2005  Nick Burrett  <nick@sqrt.co.uk>

	* clk_getres.c: New file.
	* clk_gettime.c: New file.
	* clk_settime.c: New file.
	* time.h (clock_getres): Add prototype.
	(clock_gettime): Add prototype.
	(clock_settime): Add prototype.
	* unistd.h (_POSIX_MONOTONIC_CLOCK): Define.

Thu Mar 31 10:25:40 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/sigstate.h (__valid_address): Prepend '__' as this is
	a globally defined function.  Set args to 'void *' to reduce
	explicit-casting in source.
	(__write_backtrace): Add prototype.
	* signal/post.c (__valid_address): Adjust accordingly.
	(__write_backtrace): Make global.
	(__unixlib_raise_signal): Stablise signal handling in unpredictable
	situations, or die when we find parts of the environment are
	in a bad state.

Wed Mar 30 22:37:44 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/tty.c (__ttyicanon): Restore the previous escape
	  state, rather than just assuming it was set.

Tue Mar 29 23:44:37 2005  Peter Naulls  <peter@chocky.org>

	* source/unix/getenv.c, source/unix/select.c: Avoid
	  NULL pointer reading.

Mon Mar 28 15:56:14 2005  John Tytgat  <John.Tytgat@aaug.net>

	* kernel.h: Better describe its intention; Added prototypes
	  __rt_allocauto() and __rt_freeauto().
	* signal/post.c: Added ptr to int cast avoiding Norcroft compiler
	  error.
	* sys/_alloca.s: Exported __rt_allocauto() and __rt_freeauto()
	  as aliases for alloca() and nop.  For Norcroft users.

Sat Mar 26 23:32:09 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/signal/post.c (post_signal): Open a command window if the
	  backtrace would otherwise get lost.

Mon Mar 21 12:03:23 2005  Peter Naulls  <peter@chocky.org>

	* source/clib/pthread.h, source/pthread/lock.c: Tidy comments.
	* source/pthread/context.c: Fix spelling.
	* clib/unixlib/unix.h, source/unix/unix.c, source/sys/_syslib.s:
	  Avoid creating FP exceptions on overflows and other FP operations
	  more like Unix behaviour.

Sun Mar 20 15:44:23 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/riscosify.c, source/common/unixify.c,
	  source/unix/dirent.c: Use __os_swi instead of _kernel_swi to avoid
	  modifying errno (Bug#140).

Sat Mar 19 19:26:16 2005  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/sys/_swi.s, source/test/test1-swi.c: Fix handling of return
	  registers > r3. Update testcase appropriately.

Sat Mar 19 11:54:53 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dev.c (__fsread): Fix potential buffer overflow.
	  (__fslseek): Cope with being called for a directory.
	  (__fsfstat): Fix double free when called for a directory.

Tue Mar 15 22:07:05 2005  Alex Waugh  <alex@alexwaugh.com>

	* Docs/ReadMe: Document new behaviour of environment variables.
	  Update fork/wimpslot section.
	* source/clib/stdlib.h (unsetenv, putenv): Fix prototypes.
	* source/clib/unixlib/unix.h: Add/remove prototypes.
	* source/common/prefix.c, source/unix/features.c: Add extra
	  parameter to __getenv_from_os calls.
	* source/unix/{getenv.c, putenv.c, setenv.c}: Change environment
	  variable behaviour to use global RISC OS environment for anything
	  with a $ in the name, and the process' private environment otherwise.
	* source/unix/unix.c: Populate environ on program initialisation.

Sun Mar 13 19:37:45 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Fix logic for out of memory error handling.

Sun Mar 13 17:34:18 2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/module/sul.s: error_active address doesn't need module_start
	  compensation in ADR usage.

Sun Mar 13 10:05:00 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/locale/localeconv.c (localconv): Ensure everything we free
	  was malloced in the first place.

Sat Mar 12 13:32:27 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: stdin/stdout should only be opened if we
	  haven't inherited them from a parent.

Sat Mar 12 10:29:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/setjmp.h, source/sys/_jmp.s: Remove unused entry from
	  jmp_buf.

Sun Mar 6 21:48:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Fix unpredictable MUL instruction.

Sat Mar 5 15:45:00  2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/common/unixify.c (__unixify): __RISCOSIFY_FILETYPE_EXT
	  support got broken.

Fri Mar 4 21:55:54  2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unistd.h, source/clib/unixlib/{asm_dec.s,
	  buildoptions.h, dev.h, fd.h, local.h, tty.h, unix.h},
	  source/common/{_atomic.s, sockvalid.c},  source/module/sul.s,
	  source/netlib/{accept.c, bind.c, connect.c, getpeernam.c,
	  getsocknam.c, getsockopt.c, listen.c, recv.c, recvfrom.c, recvmsg.c,
	  send.c, sendmsg.c, sendto.c, setsockopt.c, shutdown.c, socket.c},
	  source/pthread/_context.s, source/resource/{getegid.c, geteuid.c,
	  getgid.c, getpgrp.c, getpid.c, getppid.c, getprior.c, getuid.c,
	  seteuid.c, setgid.c, setpgrp.c, setprior.c, setuid.c},
	  source/signal/{kill.c, post.c}, source/sound/dsp.c,
	  source/stdio/{fopen.c, stdio.c, tmpfile.c}, source/sys/{_exec.s,
	  _syslib.s, _vfork.s, debug.c, exec.c, stackalloc.c, vfork.c},
	  source/termios/{tcgetattr.c, tcsetattr.c}, source/unistd/{fchdir.c,
	  fchown.c}, source/unix/{close.c, dev.c, dup2.c, fchmod.c, fcntl.c,
	  features.c, fstat.c, ioctl.c, isatty.c, ispipe.c, lseek.c, open.c,
	  pathconf.c, pipe.c, proc.c, read.c, readv.c, reopen.c, select.c,
	  stat.c, sync.c, truncate.c, tty.c, umask.c, unix.c, wait4.c, write.c,
	  writev.c}:
	  Rewrite large parts of vfork() and exec(), and add better support
	  for fork(). Make SUL aware of processes, and improve file descriptor
	  handling.

Wed Mar 2 22:54:07 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Fix parsing for commandline redirection when
	  the command line contains quotes.

Sat Feb 12 13:44:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s: Disable context switching in
	  taskwindows, as it doesn't work reliably.

Wed Feb 9 23:13:58 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/select.c (__return_fd_set): Only clear fds that are
	  sockets.

Wed Feb 9 21:09:05 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/pthread.h, source/clib/signal.h,
	  source/pthread/newnode.c, source/pthread/signal.c: Add partial
	  implementation of sigwait().

Mon Feb 7 14:52:18 2005  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/regexp/{cclass.h, cname.h, engine.h, regcomp.c,
	  regexec.c, regerror.c, regfree.c, utils.h, COPYRIGHT}:
	  Use regex implementation from NetBSD CVS. The previous
	  version appeared to be non-POSIX compliant.
	* source/regexp/{regexp.c, regmagic.h, regsub.c}: Remove unused files

Sun Feb 6 19:48:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Change upcall handler to refuse all new
	  applications from starting. This avoids bugs in the current
	  upcall handler.

Sun Jan 30 16:04:32 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/pipe.c, source/unix/dev.c, source/clib/unixlib/unix.h:
	  Remove linked list of all open pipes, as the same functionality can
	  be achived simply by setting the O_UNLINKED flag on the pipe.

Sat Jan 29 17:23:04 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/context.c (__pthread_context_switch): Remove thread
	  from condition variable list if it times out waiting for the
	  condition variable.

Mon Jan 24 16:44:19 2005  Peter Naulls  <peter@chocky.org>

	* source/regexp/regex2.h, source/regexp/regfree.c,
	  source/regexp/utils.h: Added: regfree() support.
	* source/pthread/key.c: Reuse key structure if it's already
	  allocated for a given ID.
	* source/pthread/keydest.c: Fix spelling.
	* source/pthread/lock.c: Return EBUSY when trying for a lock.

Sun Jan 23 21:27:23 2005  John Tytgat  <John.Tytgat@aaug.net>

	* features.h: More constify __program_name, ___program_name,
	  __dynamic_da_name and prototyped ___dynamic_da_name.
	* source/sys/_syslib.s: Defined ___dynamic_da_name.
	* source/sys/mman.c (mmap): DA name is __dynamic_da_name when defined,
	  otherwise <program name> + " MMap". Suggestion of Alex in bug #138.

Sun Jan 23 20:27:33 2005  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added more info on what <program name> really is.
	Changed iconv URL into a version independent link.
	* source/clib/features.h: Added prototypes for ___program_name (internal)
	  and __program_name (WEAK public symbol).
	* source/clib/fenv.h: Updated comment for FE_TONEAREST.
	* source/clib/unixlib/unix.h: Made get_program_name() available.
	* source/sys/_longlong.s: Updated comments.
	* source/sys/_syslib.s: Support for __program_name (up to 32 chars).
	* source/sys/mman.c: DA name is <program name> + " MMap". This addresses
	  bug #138.
	* source/unix/features.c (get_program_name): Support for __program_name.

Sat Jan 22 00:06:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unixlib/unix.h (_PROCMAGIC): Change magic number as a
	  temporary workaround for bug#137

Sun Jan 16 18:25:33 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c (find_redirection_type): Don't treat <
	  and > inside quoted arguments as redirection characters.

Sun Jan  9 23:26:02 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/locale/nl_langinfo.c (nl_langinfo): Change CODESET value to
	  a format that iconv recognises.

Wed Jan  6 23:42:25  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/Copyright: consistent spelling of UnixLib.
	* source/test/{test1-swi.c, test2-seg.c, test3-fpe.c}: Likewise.

Wed Jan  6 23:13:25  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/_syslib.s: Removed export of non-existing __os_version
	  symbol.

Wed Jan  6 23:07:25  John Tytgat  <John.Tytgat@aaug.net>

	* gen-makefiles.pl: Generated stubs.h file contains a gen-makefiles.pl
	  reference; clean target removes all obj subdirectories instead of
	  the objects in the o sub-directories.
	* obj/Makefile.in: Likewise.
	* source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s}:
	  0/0 didn't raise despite previous fix; modulo result wasn't correct
	  when numerator was zero.  Bugs reported by Stefan Bellon.
	* source/regexp/{regexp.c, regsub.c}: Norcroft compilation fixes.
	* source/resolv/inet_net_pton.c: Likewise.
	* source/sys/{_smod.s, _umod.s}: Added "IMPORT raise" for objasm
	  compatibility.

Wed Jan  5 11:33:20 2005  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe36c1, Docs/ReadMe36c2, Docs/ReadMe36d, Docs/ReadMe36e,
	  Docs/ReadMe37a, Docs/ReadMe37b, Docs/ReadMe38: Remove - out
	  of date information.
	* Docs/Copyright: Draft of new UnixLib copyright statement.
	* source/clib/regex.h: Matching header file for source.

Tue Jan  4 22:50:42 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c (add_directory_name): Slashes should be
	  converted to dots.

Tue Jan  4 00:30:47 2005  Peter Naulls  <peter@chocky.org>

	* source/regex.c: Removed.
	* source/regexp/COPYRIGHT, source/regexp/regerror.c,
	  source/regexp/regexp.c, source/regexp/regmagic.h,
	  source/regexp/regsub.s: Added: Alterntate regex implementation.

Mon Jan  3 23:33:47 2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/sys/types.h: Define int64_t and u_int64_t for Norcroft
	  users.
	* source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s}:
	  Raise SIGFPE when there is an integer division by zero.
	* source/sys/{_sdiv.s, _smod.s, _udiv.s, _umod.s}: Likewise.
	* source/string/rawmemchr.c: Workaround for Norcroft users.
	* source/sys/_divtest.s (__rt_divtest, x$divtest): No longer console
	  writing of a division by zero and a SIGFPE raise instead of a
	  SIGABRT raise.
	* source/sys/_longlong.s: License statement didn't cover complete
	  source; Implementation of _ll_urdv and _ll_srdv got argument order
	  wrong.

Mon Jan  3 16:28:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s (__pthread_stop_ticker): Stack register
	  that gets corrupted.
	* source/pthread/exit.c (pthread_exit): Fix potential race condition.

Mon Dec 27 19:38:27 2004  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/sys/_swi.s: Simplify _BLOCK and _RETURN handling.
	  Modify return of PC to work on <ARMv3.
	* source/test/test1-swi.c: Improve test case.

Sun Dec 26 18:09:45 2004  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/sys/_swi.s: Clean implementation of this file.

Wed Dec 22 23:32:12 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/strsignal.c (strsignal): Add the RISC OS error string to the
	  return value in case of SIGOSERROR.
	* source/sys/exec.c (execve): Extended the hack to recognize
	  "/bin/sh -c" execs.  This solves bug 86.

Sat Dec 25 10:23:30 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/libgen.h, source/misc/dirname.c,
	  source/stdlib/xpg_basename.c, source/string/memrchr.c,
	  source/string/rawmemchr.c, source/clib/string.h:
	  Add libgen.h functionality (dirname, basename) and related
	  changes in support of these functions.
	* source/stdio/printf.c: libscl compatibility - this is a temporary
	  workaround for libscl varargs.

Thu Dec 23 20:51:31 2004  Peter Naulls  <peter@chocky.org>

	* source/sound/dsp.c, source/clib/swis.h, source/clib/unixlib/dev.h,
	  source/unix/dev.c, source/unix/write.c: Complete rewrite of
	  DSP support to use streaming interface in DigitalRenderer
	  and therefore suffer less lag.  Also will yield during write
	  to prevent blocking, and better support for some ioctls.
	* source/signal/signal.c, source/sys/_syslib.s: Fix typos.
	* source/unix/unix.c: Ensure DigitalRenderer deregister on
	  an abort.

Mon Dec 20 16:18:55 2004  Peter Naulls  <peter@chocky.org>

	* source/math-asm/_fabsf.s: Added fabsf function.
	* source/sys/_mem.s, source/sys/_memset.s:  Replaced
	  our memset with hopefully faster (and simpler) one
	  from glibc.
	* source/clib/sys/queue.h: Add sys/queue.h functionality.

Sat Dec 18 18:37:52 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/debug.c: Removed __debugnl(); Added debug print of
	  struct proc::cli and struct proc::dde_prefix.
	* source/sys/exec.c (execve): First shift contents of struct proc::envp
	  array and then the array ptr (and not visa versa).  Bug reported by
	  Steve Ellacott.

Thu Dec 16 17:09:18 2004  Peter Naulls  <peter@chocky.org>

	* source/common/riscosify.c: Handle use of ~ in filenames
	  by substituting our HOME value.

Thu Dec 16 11:32:48 2004  Peter Naulls  <peter@chocky.org>

	* source/termios/tcsetattr.c: Compare the correct flags before
	  setting CBREAK/RAW.
	* source/unix/tty.c: Do ICRNL only when INLCR is not set.
	  Don't clear all the flags when CBREAK is set (corrects
	  returning CR instead of LF in non-canonical mode).

Wed Dec 15 17:54:07 2004  Peter Naulls  <peter@chocky.org>

	* source/common/unixify.c: Pull in functionality from rname.c,
	  so unixify works much better.

Tue Dec 14 23:10:26 2004  Peter Naulls  <peter@chocky.org>

	* source/common/riscosify.c: Make riscosify really work for
	  libscl.
	* source/unix/fchmod.c: Allow to build when cross compiling.

Sat Dec 11 15:02:57 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/swiparams.h: Added OSFILE_WRITECATINFO_ALL,
	  OSFILE_DELETENAMEDOBJECT, OSFILE_CREATEDIRECTORY,
	  OSFILE_CREATEEMPTYFILE_FILETYPE; Consult the __UNIXLIB_USEFILEPATH
	  value instead of checking on its existence (which is now always the
	  case).
	* source/stdio/rename.c: Using new OSFILE_* constants.
	* source/unix/chmod.c: Likewise.
	* source/unix/{dev.c, fchmod.c, mkdir.c, unlink.c, utime.c}: Likewise.
	* source/pthread/{context.c, create.c, error.c, exit.c):
	  __os_print("\r\n") -> __os_nl()
	* source/signal/post.c: Likewise.
	* source/stdio/{flsbuf.c, fopen.c, fpos.c, fwrite.c, newstream.c,
	  unix.c}: Likewise.
	* source/sys/{brk.c, debug.c, exec.c, execvp.c, statckalloc.c, vfork,c}:
	  Likewise.
	* source/unix/{dev.c, dirent.c, getenv.c, open.c, stat.c, unix.c}:
	  Likewise.
	* souce/sys/_syslib.s (__unixlib_fatal): Added useful reminder as
	  comment.
	* source/unix/unix.c: Fill RISC OS error buffer before calling
	  __unixlib_fatal(); When __UNIXLIB_SET_DDEPREFIX is defined, always set
	  DDEPrefix to its value at startup; Added malloc()/realloc() return
	  value check.

Wed Dec  8 16:11:55 2004  Peter Naulls  <peter@chocky.org>

	* source/unix/dev.c (__fsopen): Only close the file if
	  attribute setting whilst the file is open fails.

Tue Dec  7 22:54:45 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/stdio/fflush.c (fflush): Don't return an error if a read
	  only stream is flushed.

Sat Dec  4 23:07:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/select.c: Norcroft compatibility; unsigned modulo
	  instead of signed for better code.

Sat Dec  4 15:10:37 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/pwd/pwdread.c (__pwddefault): Prevent potential NULL
	  dereference, and ensure pw_dir is not returned as NULL.

Fri Dec  3 11:34:41 2004  Peter Naulls  <peter@chocky.org>

	 * source/clib/unixlib/dev.h. source/netlib/accept.c,
	   source/netlib/socket.c, source/unix/close.c,
	   soure/unix/select.c:  More select() speed improvements.
           These make a noticeable difference.

Thu Dec  2 14:42:35 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/termios.h: Add arbitrary value for XCASE.
	* source/sound/dsp.c: Modify buffer sizes for slightly better
	  behaviour.
	* source/unix/dev.c: Make fopen "w+" work over ShareFS.
	* source/unix/select.c: Attempt some speed improvements.
	* source/unix/unix.c: Make command line arguments with apostrophes work.

Sun Nov 28 22:01:02 2004  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: mention APCS-32 explicitly.
	* Docs/ReadMe: UnixLib$pcnt is another internally used environment
	  variable.
	* source/psignal.c (psignal): Get rid of 'register'.
	* source/clib/errno.h: Remove __set_errno multiple define protection
	  as this shouldn't be needed.
	* source/clib/stdio.h (getc): Always use the getc() function instead
	  of using the macro equivalent (bug 122).
	* source/clib/unixlib/asm_dec.s (NetSWI*): Let all the macros import
	  __net_error themselves; Updated their comments; Simplified the
	  NetSWIsimple(0) even further.
	* source/clib/unixlib/buildoptions.h (__UNIXLIB_SET_DDEPREFIX): Added.
	* source/clib/unixlib/sigstate.h: __write_unrecoverable, __backtrace,
	  __core: Removed as it was nowhere used; __backtrace_getfp,
	  __ul_callbackfp: Added.
	* source/clib/netlib/{_accept.s, _bind.s, _connect.s, _getpeers.s,
	  _getpeerna.s, _getsockna.s, _getsockop.s, _gettsize.s, _listen.s,
	  _readv.s, _recv.s, _recvfrom.s, _recvmsg.s, _sclose.s, _select.s,
	  _send.s, _sendmsg.s, _sendto.s, _sendtosm.s, _setsockop.s,
	  _shutdown.s, _sioctl.s, _socket.s, _sockstat.s, _sread.s, _swrite.s,
	  _writev.s}: Removed IMPORT __net_error_simple_entry.
	* source/clib/netlib/_net_error.s: Updated comments; Removed
	  __net_error_simple_entry as direct calling __net_error from
	  NetSWIsimple(0) macros is possible; Removed preserve of ip.
	* source/scl/{_kernel.s, _kswi_c.s}: _kernel_NONX feature wasn't
	  working at all.
	* source/signal/_signal.s: Removed needless IMPORT of
	  __write_unrecoverable; Updated a couple comments; Take a snapshot
	  of CPSR during each hardware exception handler; Renamed __ul_errfp
	  to __ul_callbackfp as this should only be the fp and valid during
	  CallBack handler code (shared by the hardware exception handlers too),
	  during error handler this is NULL; Instead of reseting the exception
	  FP flags, we temporary disable FP traps (cfr bug 119); Pull
	  __ul_callbackfp in C$$data area.
	* source/signal/post.c: Removed needless __write_unrecoverable; Updated
	  write_backtrace so it becomes more useful and foolproof.
	* source/stdio/flsbuf.c: Replaced -1 by EOF.
	* source/stdio/fwrite.c: Likewise.
	* source/sys/_syslib.s: Updated some comments.
	* source/unix/unix.c: Make use of new __UNIXLIB_SET_DDEPREFIX build
	  option.
	* source/unix/write.c: Test on existence of SIGPIPE is no longer
	  needed when we're already checking for __UNIXLIB_FEATURE_PIPEDEV.
	* source/unix/writev.c: Added test on __UNIXLIB_FEATURE_PIPEDEV.

Sun Oct 10 17:37:38 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Change default back to not setting
	  DDEUtils_Prefix

Sat Oct 23 19:00:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/dev.c: RMEnsure CryptRandom 0.12; Removed
	  __UNIXLIB_NO_COMMON_DEV support;
	* source/clib/unixlib/dev.h: Constify __dev; Removed
	  __UNIXLIB_NO_COMMON_DEV support.
	* source/unix/tty.c: Removed __UNIXLIB_NO_COMMON_DEV support.
	* Docs/ReadMe: Documented the usage of CryptRandom module and its home
	  URL.
	* source/clib/stdio.h: Removed personal comment.
	* source/clib/unixlib/buildoptions.h: Fixed spelling mistake.
	* source/clib/unixlib/os.h (__seterr): Added more info on its behaviour.
	* source/locale/iconv.c (iconv): RMEnsure at least Iconv 0.02 and use
	  ModuleTooOld error number instead of 0.
	* source/sound/dsp.c (__dspopen): Use ModuleTooOld error number instead
	  of 0.
	* source/pthread/{_ints.s, _yield.s}: Talk about APCS-32 instead of
	  APCS.
	* source/signal/sigexec.s: Likewise.
	* source/sys/_syslib.s: Likewise.
	* source/signal/_signal.s: Likewise. Temporary workaround for
	  _kernel_last_oserror() in __seterr() which changes error number 0
	  into 1.
	* source/sys/errlist.c: Removed register usage.
	* source/unix/fnmatch.c: Reverted back to 1.2 version because making
	  1.3 to work involves pulling in too many other GLIBC based code.

Sun Oct 17 18:19:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added 'Building' section.
	* objs/Makefile.in: target 'clean' removes UnixLib:o.UnixLib too.
	* source/clib/{fnmatch.h, langinfo.h, nl_types.h, bits/locale.h}: Added
	  CVS/RCS keyword header.
	* source/clib/string.h: Remove #define ffsl. Declared ffsll too for
	  Norcroft users.
	* source/clib/unixlib/asm_dec.s, source/common/_exist.s,
	  source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s},
	  source/netlib/{_getsockop.s, _recvfrom.s, _select.s, _sendto.s,
	  _setsockop.s}, source/pthread/{_context.s, _ints.s},
	  source/scl/{_kernel_swi.s, _kgetenv.s, _kosargs.s, _kosbget.s,
	  _kosbput.s, _kosbyte.s, _koscli.s, _kosfind.s, _kosgbpb.s, _kosrdch.s,
	  _kosword.s, _koswrch.s, _ksetenv.s}, source/sys/{_alloca.s,
	  _longlong.s, _mem.s, _mman.s, _modsi3, _os.s, _syslib.s, _vfork.s}:
	  Removed stackreturn macro.
	* source/clib.unixlib/asm_dec.s, source/unix/getpagsiz.s,
	  source/time/_clock.s, source/sys/{_umod.s, _udiv10.s, _udiv.s,
	  _syslib.s, _smod.s, _sdiv10.s, _sdiv.s, _profile.s, _os.s, _mem.s,
	  _longlong.s, _jmp.s, _divtest.s, _alloca.s, _ffsll.s, _ffs.s,
	  _signal.s, _memchk.s, _kswi_c.s, _kcurskch.s},
	  source/pthread/{_ints.s, _exit.s, _context.s},
	  source/netlib/{htons.s, htonl.s, _net_error.s, _bswap32.s},
	  source/math-asm/{_tanhf.s, _tanh.s, _tanf.s, _tan.s, _sqrt.s,
	  _sinhf.s, _sinh.s, _sinf.s, _sincos.s, _sin.s, _signbit.s, _powf.s,
	  _pow.s, _modf1f.s, _modf1.s, _logf.s, _log10f.s, _log10.s, _log.s,
	  _ldexpf.s, _ldexp.s, _isnan.s, _isinf.s, _hypot.s, _ftstexcpt.s,
	  _fsetexcpt.s, _fraiseexc.s, _floorf.s, _floor.s, _finite.s,
	  _fesetroun.s, _fesetenv.s, _feholdexc.s, _fegetrnd.s, _fegetenv.s,
	  _fclrexcpt.s, _fabs.s, _expf.s, _exp.s, _coshf.s, _cosh.s, _cosf.s,
	  _cos.s, _copysign.s, _ceilf.s, _ceil.s, _atanf.s, _atan2f.s,
	  _atan2.s, _atan.s, _asinf.s, _asin.s, _acosf.s, _acos.s},
	  source/gcccompat/{_umodi3.s, _udivdi3.s, _moddi3.s, _divdi3,s},
	  source/common/{_riscosify.s, _exist.s}: Removed return macro.
	* source/string/{_ffs.s, _ffsll.s}: Added.  Short & fast asm versions
	  instead of ffs.c and ffsll.c.
	* source/string/{ffs.c, ffsll.c}: Removed.  Replaced by _ffs.s and
	  _ffsll.s.
	* source/clib/unixlib/{buildoptions.h, stdcmac.h, stdsmac.h}:
	  Added.  buildoptions.h is now the only file containing build related
	  options.  stdcmac.h and stdsmac.h are support files allowing
	  buildoptions.h be used in C and ASM files.
	* source/clib/unixlib/features.h: Removed.
	* source/clib/unixlib/asm_dec.s: Moved build options to buildoptions.h.
	* source/math-asm/{_acosf.s, _asinf.s, _atan2f.s, _atanf.s, _ceilf.s,
	  _cosf.s, _coshf.s, _expf.s, _floorf.s, _ldexpf.s, _log10f.s, _logf.s,
	  _modf1f.s, _powf.s, _sinf.s, _sinhf.s, _tanf.s, _tanhf.s}:
	  Uses build option __UNIXLIB_NORCROFT_BUILD to determine which float
	  ABI is used (GCC vs Norcroft).
	* source/unix/fnmatch.c: Disabled calling versioned_symbol(),
	  strong_alias(), compat_symbol() and libc_hidden_ver().
	* source/clib/arpa/{inet.h, nameser.h}, source/clib/bits/huge_val.h,
	  source/clib/{alloca.h, complex.h, crypt.h, ctype.h, dirent.h,
	  fcntl.h, fenv.h, glob.h, grp.h, iconv.h, inttypes.h, kernel.h,
	  locale.h, math.h, nl_types.h, pthread.h, pwd.h, setjmp.h, sgtty.h,
	  stdint.h, string.h, swis.h, termcap.h, termios.h, time.h, unistd.h,
	  utime.h, wchar.h}, source/clib/machine/ieee754.h, source/clib/net/if.h,
	  source/clib/netinet/{in.h, in_systm.h, ip_icmp.h, ip_var.h, tcp.h,
	  udp.h}, source/clib/resolv/resolv.h, source/clib/rpc/netdb.h,
	  source/clib/sys/{byteorder.h, cdefs.h, debug.h, file.h, ioctl.h,
	  mman.h, netdb.h, poll.h, resource.h, select.h, socket.h, stat.h,
	  statfs.h, syslog.h, time.h, timeb.h, times.h, uio.h, utsname.h,
	  wait.h}, source/clib/unixlib/{dev.h, fd.h, local.h, os.h, sigstate.h,
	  tty.h}, source/crypt/crypt-private.h: Changed unixlib/features.h into
	  features.h.
	* source/common/stat.c, source/stdlib/random.c, source/sys/{alarm.c,
	  exec.c, stackalloc.c, vfork.c}, source/unix/{dev.c, pipe.c, tty.c,
	  write.c}: Removed unixlib/features.h.
	* source/crypt/crypt_util.c: No need to define __GNU_LIBRARY__
	  explicitly because this is now done in features.h.

Tue Oct 12 09:11:22 2004  Peter Naulls  <peter@chocky.org>

	* source/regex.c, source/realpath.c, source/time/mktime.c,
	  source/unistd/getpass.c: Work better with Norcroft.
	* source/clib/assert.h, source/clib/getopt.h, source/clib/netdb.h,
	  source/clib/stdio.h, source/clib/strings.h, source/clib/types.h,
	  source/clib/unixlib/types.h, source/unixlib/unix.h:
          Reference moved features.h
	* source/clib/unixlib/features.h: Warning if we use the old
	  features.h file path.
	* source/module/sul.s: Fix inadvertant change to SWI base.

Sun Oct 10 17:37:38 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/uname.c: Cope with OS_ReadSysInfo returning 0

Fri Oct  8 12:56:32 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/signal.h, source/signal/signal.c: Stub siginterrupt
	* source/clib/time.h, source/time/mktime.c, source/time/dysize.c,
	  source/time/timegm.c: Add support for mktime, timelocal, dysize.
	* source/clib/features.h, source/clib/unixlib/features.h:
	  Move features.h to same location as glibc. Make unixlib/features.h
	  include former for time being.
	* source/clib/sys/mount.h, source/sys/mount.c: Stub mount.h
	  functionality.
	* source/common/riscosify.c: Modify to work with libscl too.
	* source/unix/fnmatch.c: Update functionality.
	* source/locale/iconv.c, source/clib/iconv.h: Work with Norcroft
	  properly.

Tue Oct  5 16:24:01 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/swis.h, source/locale/iconv.c: Update to sync with
	  John-Mark Bell's changes.
	* source/clib/netdb.h: Further improve visibility of macros
	  for unsupported functions.
	* source/unix/unix.c: Improve comment.
	* Docs/ReadMe: Update iconv URL.

Fri Sep 24 00:09:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Predefined _GNU_SOURCE as quick fix for Norcroft
	  users after the 12 Sept 2004 change in post.c.  Better fix would
	  probably be to make sure that UnixLib is compilable with and without
	  _GNU_SOURCE defined.
	* source/clib/sys/debug.h (__debug): Added comment what __debug is
	  doing.
	* source/clib/unixlib/sigstate.h (valid_address): constify its
	  parameters
	* source/signal/post.c (valid_address): Likewise.
	* source/clib/unixlib/unix.h: Minor comment updating.
	* source/scl/_koscli.s: Likewise.
	* source/pthread/_ints.s: Reverted the signed/unsigned compare change
	  from 7 Sep 2004 on request from Alex.
	* source/sound/dsp.c: Test result of first __os_cli("RMEnsure...
	  call too.
	* source/locale/iconv.c: Likewise; Added CVS/RCS keyword header.
	* source/signal/_signal.s (return_quickly/__h_cback_common): Removed
	  unnessary teq pc,pc test (partly revert from 7 Sep 2004 change).
	  Feedback from Alex.
	* source/sys/_longlong.s (_ll_ufrom_d, _ll_sfrom_d, _ll_ufrom_f,
	  _ll_sfrom_f): Added, based on a patch from Jeffrey Lee for
	  gccsdk/gcc/libgcc/lib1aof.s.
	* source/sys/debug.c (__debug): Avoid crash when __u is bogus; Print
	  the has_process value too.
	* source/sys/exec.c (execve): execve() after fork() still means that
	  there is a parent so has_parent may not be reset.  Also necessary
	  to correctly identify when dde_prefix needs to be set & used in
	  unix.c (__unixinit, _exit).
	* source/unix/unix.c (__unixinit, _exit): dde_prefix may only be updated
	  and used to reset process' CSD when the process isn't a child; Added
	  assert that has_parent is always set in a process struct found via
	  UnixLib$env; (_exit) Removed test based on has_parent/___vret because
	  we want both parent & child to exit via __exit() and not directly
	  via __vret (resumely legacy code).

Fri Sep 17 19:20:35 2004  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe: Updated documentation.
	* source/clib/fnmatch.h: Updated fmatch.h from glibc.  Needs matching
	  C support still.
	* source/clib/langinfo.h, source/clib/nl_types.h,
	  source/clib/bits/locale.h, source/clib/locale/nl_langinfo.c:
	  Very basic langinfo support.
	* source/clib/netdb.h: Hide getaddrinfo declaration.
	* source/clib/stat.h, source/unix/stat.c: Make stat/stat64
	  more like glibc to avoid problems with forward declarations.
	* source/signal/signal.c: Remove warning.

Fri Sep 17 19:20:35 2004  John-Mark Bell  <jmb@netsurf-browser.org>

	* source/clib/semaphore.h, source/pthread/sem.c,
	  source/clib/pthread.h: Semaphore support.
	* source/clib/netdb.h, source/netlib/getnameinfo.c: getnameinfo
	  support.
	* source/clib/resource.h: define values that are implemented.

Sun Sep 12 09:20:31 2004  Peter Naulls  <peter@chocky.org>

	* source/signal/post.c: Remove warnings
	* source/sound/dsp.c: Be more careful about opening and closing
	  the DRender: filesystem.
	* source/clib/swis.h, source/clib/iconv.h, source/clib/iconv.c:
	  Interface to John-Mark Bell's iconv support module, instead
	  of requiring the large external iconv library.

Thu Sep  9 13:54:55 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/dev.h, source/unix/dev.c: Add __dsplseek
	* source/sound/dsp.c: Implement __dsplseek, rearrange for
	  NULL parameter checking.  Close and reopen device if playback
	  values are changed.
	* source/termios/tcgetattr.c: Fix getting of VMIN/VTIME
	* source/termios/tcsetattr.c: Fix setting of VMIN/VTIME
	* source/unix/ioctl.c: NULL arguments to ioctl are ok.
	* source/unix/tty.c: Implement usage of VTIME, correct setting/usage
	  of VMIN.

Wed Sep  8 18:04:02 2004  John Tytgat  <John.Tytgat@aaug.net>

	* objs/.cvsignore: Added sound directory.
	* source/sys/_mem.s: Go back to v1.4 (i.e. before the Sep 7 2004 changes)
	  as there were, yet unidentified, problems with it.
	* source/sound/dsp.c (__dspopen): Enforce DigitalRenderer version 0.51.
	* source/sys/vfork.c: Include sys/debug.h instead of stdio.h when DEBUG
	  is defined.

Wed Sep  8 10:13:16 2004  Peter Naulls  <peter@chocky.org>

	* source/sys/_mem.s: Revert memcpy breakage (shows up on RISC OS 5)
	* source/sound/dsp.c: Improve stereo support, and add additional
	  ioctls.

Tue Sep  7 18:47:59 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/swis.h, source/clib/sys/soundcard.h,
	  source/clib/unixlib/dev.h, source/sound/dsp.h,
	  source/unix/dev.c: Experimental /dev/dsp support.

Tue Sep  7 16:03:14 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Documented UnixLib$env as private UnixLib environment
	  variable.
	* source/clib/setjmp.h: Aesthetic change.
	* source/clib/stdlib.h: Likewise.
	* source/clib/unixlib/asm_dec.s: Likewise.
	* source/clib/unixlib/local.h: Likewise.
	* source/stdio/fopen.c: Likewise.
	* source/sys/exec.c: Likewise.
	* source/clib/unistd.h: Added lseek64() prototype.
	* source/clib/sys/stat.h: Added lstat64(), fstat64() prototype.
	* source/clib/sys/un.h: Added RCS/CVS keywords.
	* source/clib/unixlib/asm_dec.s: Moved chunk and error definitions from
	  source/module/sul.s to here as SharedUnixLibrary_SWIChunk and
	  SharedUnixLibrary_ErrorChunk; Formally defined the
	  SharedUnixLib_Error_* errors; Incorrect SWI error exit code was
	  generated with objasm; TABified.
	* source/clib/unixlib/sigstate.h: Aesthetic change; declared
	  valid_address().
	* source/clib/unixlib/unix.h: Removed __env_read() declaration.
	  Adjusted comment on UnixEnv environment prefix.
	* source/common/unixify.c (__unixify): Suffix swapping could access
	  memory before start of path.
	* source/module/sul.s: Moved chunk and error definitions to
	  source/clib/unixlib/asm_dec.s.
	* source/pthread/_ints.s: Signed -> unsigned compares.
	* source/sys/_mem.s: Likewise; Space injections.
	* source/signal/_signal.s: Added comments; (__h_sigill, __h_sigsegv0,
	  __h_sigsegv1, __h_sigsys) removed useless instruction; (__h_event)
	  simplified; (__h_cback) exit sequences were not 26 bit system
	  compatible; Removed abortpc; CMP -> TEQ if only (non)equivalence test
	  is needed.
	* source/signal/post.c (valid_address): Exported.
	* source/sys/_exec.s: Space injections.
	* source/sys/_syslib.s: Introduced startup errors instead of VDU
	  writing; Ensuring SUL v1.02 instead of v1.00; Rename __cli ->
	  __uixlib_cli, __himem -> __image_rw_himem; a1 (on entry) of OS_Exit
	  must point to a filled in RISC OS error block; Define stack_corrupt_msg
	  and stack_corrupt conditionally; Calling __unixlib_fatal a 2nd time
	  results in panic calling OS_Exit; (stack_overflow_common) executing
	  signalhandler stack check *before* validity stack check otherwise you
	  get the wrong fatal error message.
	* source/sys/_vfork.s: Added comments.
	* source/sys/mman.c (__munmap_all): Updated comments.
	* source/sys/vfork.c: Minor cleanup.
	* source/unix/unix.c: Removed __unixlib_cli declaration; Be more
	  paranoid on the validity of __u as it might be an UnixLib$env value
	  picked up by another TaskWindow UnixLib based process doing fork()s.
	* source/unix/tty.c (__ttyioctl): Removed excessive break usage.

Mon Sep  6 09:35:03 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/pthread.h: Fix spelling mistakes. Add comment about
	  Wimp_Poll.
	* source/unix/open.c, source/unix/stat.c: Add some optional debug.
	* source/unix/select.c: Prevent blocking by judicious use of pthread
	  control.
	* source/unix/unix.c: Prevent atexit handlers being called more
	  than once.

Mon Aug 16 22:31:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/gcccompat/_divdi3.s: Return useful remainder in a3 & a4.
	* source/gcccompat/_udivdi3.s: Likewise.
	* source/gcccompat/_moddi3.s: Updated comment.
	* source/gcccompat/_umoddi3.s: Likewise.
	* source/sys/_longlong.s: Defined _ll_udiv, _ll_urdv, _ll_sdiv and
	  _ll_srdv.

Mon Aug 16 21:10:06 2004  John Tytgat  <John.Tytgat@aaug.net>

	* gen-makefies.pl: Create source.clib.o directory for Norcroft case.
	* objs/Makefile.in: Remove useless quotes for the .c.o and .c.s rules.
	* source/clib/errno.h: TABing.
	* source/clib/signal.h: Likewise.
	* source/clib/limits.h: Defined RE_DUP_MAX as 0x7fff instead of
	  _POSIX2_RE_DUP_MAX (same definition as in regex.h).
	* source/clib/math.h: Norcroft compatibility; Added __sincos()
	  declaration.
	* source/clib/wchar.h: Definition of WCHAR_MIN/WCHAR_MAX was not
	  the same as in stdint.h.
	* source/clib/sys/param.h: Conditional define of MAXHOSTNAMELEN.
	* source/clib/sys/time.h: "#define __timeval_defined" -> "#define
	  __timeval_defined 1".
	* souce/clib/unixlib/asm_dec.s: Added advise concerning signal list
	  definition.

Sun Aug  8 12:57:59 2004  Graham Shaw  <gdshaw@sagitta.demon.co.uk>

	* source/unix/features.c: Make environment variables work
	  as advertised.

Sun Aug  8 12:28:48 2004  Peter Naulls  <peter@chocky.org>
	* source/clib/features.h: Stop pretending we have full unicode
	  support.
	* source/clib/netinet/in.h: Include sys/param.h for type visibility
	  as per glibc.
	* source/clib/stdio.h: define putc_unlocked.
	* source/common/riscosify.c: Add a case for filenames that
	  GCC 3.4 sometimes constructs.

Fri Jun 18 22:56:14 2004  Alex Waugh  <alex@alexwaugh.com>

	* unix/lseek.c, unix/fstat.c: Add trailing newline.

Fri Jun 18 19:21:03 2004  Nick Burrett  <nick@dsvr.net>

	* errno.h: Drop requirement on unixlib/features.h as there is
	nothing in this header that is C++ incompatible.

Sat Jun 12 11:56:18 2004  Peter Naulls  <peter@chocky.org>

	* source/Makefile.in: Some files require _GNU_SOURCE to be defined.

Sat Jun 12 09:36:14 2004  Peter Naulls  <peter@chocky.org>

	* source/regex.c: Fix type usage
	* source/clib/math.h, source/clib/clib/bits/mathcalls.h,
	  source/clib/bits/mathdef.h, source/clib/mathinline.h,
	  source/clib/bits/nan.h: Add glibc math headers.
	* source/clib/machine/huge_val.h, source/clib/machine/nano.h:
          Remove old math headers.
	* source/clib/netdb.h: Add missing EAI_* defines.
	* source/clib/regex.h: Updated header from glibc
	* source/clib/stdlib.h: Extra include for sys/types.h as per
	  glibc to make correct types visible.
	* source/clib/bits.in.h: Avoid upsetting C++.
	* source/clib/unixlib/features.h: Include definitions from glibc,
	  fix wording.
	* source/math/j1.c, source/math/fmod: Prevent warnings
	* source/netlib/getpeernam.c: Update function header to match
	  declaration
	* source/unix/fstat.c, source/unix/lseek.c, source/unix/lstat.c:
	  Add 64-bit variants.
	* source/clib/unixlib/unix.h, source/common/funcallerr.c,
	  source/resource/initialise.c, source/resource/setprior.c,
	  source/resource/ulimit.c, source/signal/_signal.s,
	  source/sys/_alloca.s, source/sys/_exec.s, source/sys/_syslib.s,
	  source/sys/_vfork.s, source/sys/brk.c, source/sys/debug.c,
	  source/sys/exec.c, source/sys/stackalloc.c, source/unix/unix.c:
	  Rename __base, __lomem, __himem, and other unixlib internal
	  values delcared in unix.h as per discussion GCCSDK mailing list.

Sun Jun  6 13:22:36 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/uname.c: support for extracting RISC OS part number.

Sat Jun  5 21:49:35 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/netlib/inet_ntoa.c (inet_ntoa): sprintf() used incorrect
	  conversion specification.

Sat Jun  5 15:58:28 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/math-asm/_sincos.s (__sincos): Results got written to
	incorrect pointers.

Tue Jun  1 19:42:03 2004  Nick Burrett  <nick@dsvr.net>

	* kernel.h: Fix __THROW attribute positioning.

Mon May 31 14:40:09 2004  Alex Waugh  <alex@alexwaugh.com>

	Based on a patch from John-Mark Bell <jmb@netsurf-browser.org>
	* source/sys/_syslib.s: Limit max size of heap dynamic area according
	  to __dynamic_da_max_size or progname$HeapMax variables.
	* source/clib/unixlib/features.h (__dynamic_da_max_size): Add
	  declaration.
	* Docs/ReadMe: Document max size settings.

Tue May 18 22:43:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/signal/post.c: moved __ul_errbuf and __ul_fp_registers
	  declaration to errno.h; added #include errno.h; beautify output
	  of write_backtrace().
	* source/clib/errno.h: updated __ul_errbuf declaration; added
	  __ul_fp_registers declaration;  __ul_errbuf and __ul_fp_registers
	  are ony declared when __UNIXLIB_INTERNALS is defined.

Sun May 16 19:47:14 2004  Alex Waugh  <alex@alexwaugh.com>

	* signal/sigsuspend.c: Suspend only the current thread not the
	  entire process.
	* signal/sleep.c: Likewise.
	* sys/_syslib.s: Add missing IMPORTs.

Sun May 16 13:45:07 2004  James Bursa  <bursa@users.sourceforge.net>

	* signal/_signal.s: Store fp registers on a fp exception.
	* signal/post.c (post_signal): Print error buffer and fp registers.

Wed May 12 23:01:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* signal/_signal.s (__setup_signalhandler_stack): Support calling from
	  USR mode.
	* sys/_syslib.s: Call __setup_signalhandler_stack before raising a
	  signal on a stack overflow.

Mon May 10 13:52:40 2004  Peter Naulls  <peter@chocky.org>

	* clib/setjmp.h: Reinstate setjmp macro so it doesn't cause problems.
	* clib/stdlib.h: Allow strtoll/ull to be seen.  This is a work around;
	  probably the whole of the stdlib.h functionality needs to be
	  rearranged to bring it into line with glibc.

Mon May 10 11:59:58 2004  Peter Naulls  <peter@chocky.org>

	* clib/netdb.h: Disable unimplemented functions.
	* clib/setjmp.h: Remove setjmp macro - it causes problems with C++.
	* clib/stdlib.h: Remove ato* macros which cause problems with C++,
	and replace with inline fucntions from glibc headers.  Also change
	other declarations as per glibc.
	* clib/strings.h: Fix ordering of #endif at the end.
	* unistd/lockf.c: Add lockf() function.

Mon May  3 18:32:45 2004  James Bursa  <james@semichrome.net>

	* unix/dev.c: Fix for fopen() then subsequent fread() on a directory
	  returning nonsense.

Sat May 01 23:33:35 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/errno.h: Added EILSEQ.
	* source/sys/errlist.c: Likewise.

Wed Apr 21 20:42:11 2004  Alex Waugh  <alex@alexwaugh.com>

	* clib/fcntl.h: Don't define O_BINARY or O_TEXT if _POSIX_SOURCE.
	* netlib/accept.c: Remove unecessary use of O_BINARY.
	* netlib/socket.c: Likewise.

Tue Apr 20 21:57:51 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/assert.c (__assert_fail): Renamed to __assert2 & paremeter
	  order shuffling to match Norcroft SCL implementation.
	* source/clib/assert.h: Likewise.  Also using __func__ to print
	  function name.
	* source/wchar/wctype.c: Added RCS header.

Sat Apr 17 11:50:11 2004  Nick Burrett  <nick@dsvr.net>

	* sys/byteorder.h: Add __THROW attribute.
	* sys/file.h, sys/ioctl.h, sys/mman.h, sys/netdb.h: Likewise.
	* sys/poll.h, sys/resource.h, sys/select.h: Likewise.
	* sys/stat.h, sys/statfs.h, sys/syslog.h, sys/time.h: Likewise.
	* sys/timeb.h, sys/times.h, sys/uio.h: Likewise.
	* sys/utsname.h, sys/wait.h: Likewise.

Thu Apr 15 23:09:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* assert.h: __THROW should appear before any __attribute__.
	* math.h, setjmp.h, stdio.h, stdlib.h, string.h: Likewise.
	* time.h, unistd.h: Likewise.

Mon Apr 12 14:02:24 2004  Nick Burrett  <nick@dsvr.net>

	* alloca.h: Add GCC-specific small optimiser hints to function
	definitions.
	* assert.h, complex.h, ctype.h, dirent.h, fcntl.h: Likewise.
	* fenv.h, getopt.h, glob.h, grp.h, inttypes.h: Likewise.
	* kernel.h, locale.h, math.h, setjmp.h, signal.h: Likewise.
	* stdio.h, stdlib.h, string.h, time.h: Likewise.
	* pwd.h, unistd.h: Likewise.

Mon Apr 12 10:37:35 2004  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (_exit): Set DDEUtils Prefix when parent process
	exits.  Add an assertion failure if __u is NULL.
	(__unixinit): Add more explanatory comments.

Sat Apr 10 11:23:16 2004  Nick Burrett  <nick@dsvr.net>

	* stdint.h (uintptr_t): Move declaration to be not influenced
	by __intptr_t_defined.

Sat Mar 27 12:58:06 2004  Peter Naulls  <peter@chocky.org>

	* ar.h: Add Unix 'ar' format support header.

Wed Mar 24 22:22:01 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s (pthread_call_every): Check that our
	  environment handlers are in place before setting a callback.
	* source/signal/_signal.s (__h_cback): Check that the return PC is
	  within the wimpslot.
	* source/sys/_syslib.s (__upcall_handler_addr): New variable.

Wed Mar 17 20:00:14 2004  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Consisting spelling & notation.
	* Docs.ReadMe: Added "Name registration" section.
	* source/clib/sys/cdefs.h: Avoid annoying Norcroft compiler warning
	  on undefined #define symbol to be evaluated as 0.
	* source/clib/unixlib/unix.h: Changed comment on dde_prefix.
	* source/signal/sigvec.c: Static variables wrapped_handlers and
	  wrapped_masks can be (temporary ?) disabled too.
	* source/stdlib/realpath.c: Minor cleanup.
	* source/sys/exec.c: Beautify comments.
	* source/sys/vfork.c (free_process): Free process' dde_prefix.
	* source/unix/unix.c (_exit): Free process' dde_prefix. Restore
	  DDEUtils' Prefix to what it was at startup (instead of resetting
	  it what the documentation is saying).  Also don't set DDEUtils'
	  Prefix at startup with "@" because this triggers bugs in its path
	  handling on some versions of DDEUtils module.

Tue Mar 16 19:03:59 2004  Nick Burrett  <nick@dsvr.net>

	* unixlib/unix.h (__exec_cli): Add prototype.

Sat Mar 06 13:05:58 2004  Graham Shaw  <gdshaw@sagitta.demon.co.uk>

	* source/sys/exec.c (execve): Restore wimpslot and himem to
	  previous values before executing the command. Prevents a program
	  exec()ed from a vfork()/exec()ed child process from overwriting
	  the original parent.
	* source/sys/_exec.s (__exec_cli): New function.
	* source/sys/_syslib.s (__env_wimpslot): Separate out from
	  __env_riscos_and_wimpslot.

Sun Feb 29 16:36:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/pthread.h: Make __pthread_start/stop_ticker
	  visible to user programs.
	* source/clib/unixlib/local.h: Clarify description for
	  __RISCOSIFY_FILETYPE_NOT_SET.

Mon Feb 23 16:04:06 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/sigstate.h, source/unix/close.c,
	  source/signal/_coredump.s, source/signal/_signal.s,
	  source/signal/post.c: Enable writing of backtraces etc to
	  stderr.  This code isn't new, but wasn't previously enabled.
	  It is also somewhat imperfect, and doesn't handle all cases
	  on RISC OS 4 and 5, esp. register dumps.  You are encouraged to
	  improve it.

Sat Feb 21 20:58:10 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/strings.h: Remove extra #ifdef

Sun Feb 15 18:45:16 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/types.h, source/clib/math.h,
	  source/clib/stdlib.h: Use __extension__ for long long types
	  to avoid warnings.
	* source/clib/strings.h, source/clib/string.h: Handle
	  includes as GLIBC does.

Mon Feb 09 21:09:02 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/stdlib/realpath.c (realpath): Preserve any ,xyz extension.

Sun Feb 08 00:19:58 2004  Alex Waugh  <alex@alexwaugh.com>

	* Docs/ReadMe: Added sections on stack/heap changes and pthreads.

Sat Feb 07 18:07:37 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/common/riscosify.c (__sfixfind): Add length parameter to ease
	  calling from rname.c
	* source/clib/unixlib/local.h: Likewise.
	* source/common/unixify.c: Likewise.
	* source/unix/dirent.c: Likewise.
	* source/unix/unlink.c: Likewise.

Sun Jan 18 16:08:06 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/netlib/socketpair.c: Fix syntax error.

Thu Jan 15 00:18:59 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Setup,feb: Removed.
	* gen-makefiles.pl: UnixHdr$Dir -> Unix:
	* objs/Makefile.in: Likewise.
	* source/clib/swis.h: Added DDEUtils_ReadPrefix.
	* source/clib/netinet/tcp.h: Bitfields can only be taken from int so
	  slightly different struct tcphdr & tcp_info definition (patch from
	  Theo Markettos <theo@markettos.org.uk>).
	* source/clib/sys/socket.h: Added SOMAXCONN #define (patch from Theo
	  Markettos <theo@markettos.org.uk>).
	* source/clib/unixlib/local.h: Added __get_dde_prefix().
	* source/clib/unixlib/unix.h: Added dde_prefix to "struct proc" and
	  increased _PROCMAGIC to 0xfedcfa63.
	* source/common/funcallerr.c (__funcall_error): sizeof() usage.
	* source/common/prefix.c (__get_dde_prefix): New file.
	* source/netlib/socketpair.c: Reident.
	* source/sys/vfork.c: save DDEUtils_Prefix value during __vfork() and
	  restore it at __vexit().
	* source/unix/chdir.c (chdir): make use of __get_dde_prefix() instead of
	  __getenv_from_os("Prefix$Dir").
	* source/unix/getcwd.c (getcwd): Likewise.
	* source/unix/unix.c (__unixinit): Small src cleanup; Call only
	  DDEUtils_Prefix("@") when there isn't a DDEUtils_Prefix defined.

Wed Jan 07 20:58:37 2004  Nick Burrett  <nick@dsvr.net>

	* getopt.h: Prevent inclusion of ctype.h.

Mon Jan 05 23:50:26 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added section on "UnixFS$/xxx" environment variables.
	* source/regex.c (re_comp, re_exec): Enabled for old BSD4.2 based
	  sources (like CVS).
	* source/strtoll.c(strtoll): Enabled for Norcroft compiler.
	* source/strtoull.c(strtoull): Likewise.
	* source/clib/limits.h(LONG_LONG_MIN, LONG_LONG_MAX, QUAD_MAX): Likewise.
	* source/clib/sys/syslog.h: Removed _PATH_LOG definition as it doesn't
	  get used (we log everything via the Syslog module if present).
	* source/clib/unixlib/unix.h(__getenv): Removed.
	* source/unix/getenv.c(__getenv): Likewise.  Its CACHE parameter was
	  always set to 1 so we could clean up this source a bit.
	* source/scl/_koscli.s: v6 doesn't need to be preserved.
	* source/unix/unix.c(_exit): Only resetting DDEUtils_Prefix when current
	  process doesn't have a parent.

Sat Jan 03 00:11:39 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/termios.h: Redefined the B* baud values so that they fit
	  into a char (= variable type of sg_ispeed and sg_ospeed in struct
	  sgttyb).  Renamed __ispeed and __ospeed into c_ispeed and c_ospeed.
	* source/clib/unixlib/unix.h: Removed useless __bsd_speeds.
	* source/termios/cfgetispee.c(cfgetispeed): Added argument checking
	  and renamed __ispeed and __ospeed into c_ispeed and c_ospeed.
	* source/termios/cfgetospee.c(cfgetospeed): Likewise.
	* source/termios/cfsetispee.c(cfsetispeed): Likewise.
	* source/termios/cfsetospee.c(cfsetospeed): Likewise.
	* source/termios/tcgetattr.c(tcgetattr): __bsd_speeds is no longer
	  needed.
	* source/termios/tcsetattr.c(tcsetattr): Likewise.
	* source/unix/tty.c: Removed convert_baud_rate().  Renamed __ispeed and
	  __ospeed into c_ispeed and c_ospeed.  sg_ospeed gets now updated
	  in __ttyioctl(TIOCGETP) which makes password typing in getpass()
	  invisible.
	* source/unix/unix.c(__unixinit): Got rid of compiler warnings.

Tue Dec 30 12:02:35 2003  Peter Naulls  <peter@chocky.org>

	* source/wchar/wcstoul.c: Removed file containing duplicate
	  function.

Mon Dec 29 18:59:40 2003  Peter Naulls  <peter@chocky.org>

	* source/alloc.c, source/memchr.c, source/qsort.c, source/clib/math.h,
	  source/common/objattr.c, source/common/serial.c, source/common/stat.c,
	  source/locale/setlocale.c, source/math/j0.c, source/math/jn.c,
	  source/netlib/inet_ntoa.c, source/netlib/shutdown.c,
	  source/netlib/socketpair.c: Remove warnings

Mon Dec 29 17:51:43 2003  Peter Naulls  <peter@chocky.org>

	* source/math/modf.c, source/math/modff.c, source/netlib/ntop.c,
	  source/netlib/pton.c, source/wchar/wcstoq.c, source/wchar/wcstouq.c:
	  Remove files containing duplicate functions.

Mon Dec 29 16:34:25 2003  Peter Naulls  <peter@chocky.org>

	* source/sys/_vfork.s: Alias fork to vfork as a symbol
	* source/clib/sys/dirent.h: sys/dirent.h doesn't exist in glibc; only
	  dirent.h.
	* source/clib/dirent.h: Define MAXNAMLEN
	* source/clib/sys/un.h: Add, even though it isn't supported, it is
	  required to keep some programs happy.
	* source/pwd/pwdread.c: Improve behaviour of setting of pwd structure,
	  including determining username under Select.

Mon Dec 22 21:29:50 2003  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Documented the new uid feature.
	* source/clib/unixlib/unix.h (__unixlib_fatal): Documented the NULL
	  parameter behaviour.
	* source/sys/_syslib.s (__unixlib_fatal): Calling with NULL parameter
	  works again.
	* source/unix/features.c (features): Added uid feature (was formally
	  known as Unix$uid).
	* source/unix/unix.c (__unixinit): More informative __unixlib_fatal()
	  error messages; moved Unix$uid support to features.c; removed Unix$tty
	  support (use command line redirection).

Sun Dec 21 12:21:56 2003  Stefan Bellon  <sbellon@sbellon.de>

	* crypt/crypt_util.c (setkey_r): Add cast to fix Norcroft compilation.

Mon Dec 15 16:52:40 2003  Peter Naulls  <peter@chocky.org>

	* common/riscosify.c: leaf_len becomes negative in some odd
	  cases generated by 'make'.  Don't Try to copy leaf then.

Thu Dec 4 22:25:16 2003  David Marston  <david@illudium.org.uk>

	* sys/_jmp.s: Add comment.
	* sys/_vfork.s: Correct pid offset in jmp_buf.
	* sys/vfork.c: Likewise.

Sun Nov 23 22:05:07 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/asm_dec.s: Added
	  XFilter_(De)Register{Pre|Post}Filter SWI numbers.
	* source/clib/unixlib/unix.h: Renamed __wimpprogram to __taskhandle.
	* source/pthread/_context.s: Used NAME macro; pthread routines now
	  work for Wimp/TaskWindow applications too.
	* source/pthread/_exit.s: Used NAME macro.
	* source/pthread/_ints.s: Likewise.
	* source/pthread/_yield.s: Likewise.
	* source/pthread/cond.c: Added #include <stdio.h> when PTHREAD_DEBUG
	  is #define'd.
	* source/sys/_syslib.s: Instead of setting __wimpprogram to 1 when
	  we're multitasking, we fill the non zero taskhandle value in
	  __taskhandle.
	* source/signal/sleep.c: Renamed __wimpprogram to __taskhandle.
	* source/time/getitmr.c: Likewise.
	* source/time/setitmr.c: Likewise.
	* source/unix/tty.c: Likewise.
	* source/unix/unix.c: Likewise.
	* source/unix/fcntl.c: Fixed typo : "!=" -> "|=" !

Sat Nov 22 00:47:33 2003  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: SharedULib has to come into !System.310.Modules, not
	  !System.Modules.  Advised to use the !System merger instead of
	  manually copying.

Fri Nov 21 21:25:47 2003  Peter Naulls  <peter@chocky.org>

	* clib/wctype.h, wchar/wctype.h: Added wctype functions.

Fri Nov 21 14:26:31 2003  Peter Naulls  <peter@chocky.org>

	* clib/time.h: Rename parameters inline with glibc, and to
	  avoid warnings
	* clib/sys/cdefs.h: Additional declarations inline with glibc
	* clib/unixlib/features.h: Remove declarations repeated in
	  cdefs.h
	* clib/unistd.h: Bring somewhat inline with glibc, and avoid
	  warnings with brk/sbrk declarations.
	* sys/brk.c: Change sbrk defintion to match above

Wed Nov 19 00:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/net/if.h: Commented out declaration of the if_*()
	  routines (we don't have them implemented).
	* Boot,fe1: Removed last new-line character.
	* Run,fe1: Likewise.
	* Setup,fe1: Likewise.
	* !Help: Cleaned up "Installation" section a bit; Provided the
	  "Distributing of UnixLib based programs" section.
	* CallASWI.CallASWI,ffa: Removed (see !Help for info on obtaining the
	  latest version).
	* CallASWI.ReadMe: Likewise.

Sat Nov 01 21:40:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/unix.c (_exit): Previous fix didn't properly unset
	  DDEUtils_Prefix.

Thu Oct 30 22:58:57 2003  Alex Waugh  <alex@alexwaugh.com>

	* unix/getcwd.c (getcwd): Canonicalise result before unixifying it.
	  Remove obscure methods for finding the cwd.

Sun Oct 26 14:15:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Added rule to build SharedULib.  Also default
	  "All" rule will copy UnixLib into <UnixHdr$Dir>.UnixLib.
	* objs/.cvsignore: Added SharedULib,ffa.
	* source/clib/bits/netdb.h: Changed type of 'request' param fo ioctl
	  call from 'int' to 'unsigned long'.
	* source/clib/sys/netdb.h: Likewise.
	* source/clib/unixlib/dev.h: Likewise.
	* source/unix/dev.c: Likewise.
	* source/unix/ioctl.c: Likewise.
	* source/unix/tty.c: Likewise.  Avoided Norcroft compiler warning
	  too.
	* source/clib/sys/ioctl.h: Sync'ed with information in RISCOS Ltd.'s
	  StubsG ioctl.h file.  Added further compatibility with
	  COMPAT_INET4.
	* source/unix/unix.c: Setup DDEUtils_Prefix with "@" so that chdir()
	  calls don't change RISC OS' CSD.  When DDEUtils module is not
	  loaded, RISC OS' CSD will change.  Suggestion by Stefan Bellon.

Tue Oct 21 20:26:20 2003  David Marston  <david@illudium.org.uk>

	* module/sul.s: Fix 32-bit behaviour

Sun Oct 12 22:16:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/dev.c (__getdevtype): Introduced rofs2dev mapping table
	  which maps RISC OS FS to Unix devices where it makes sense.  Solves
	  null: as stdin redirection problem reported by Stefan Bellon.

Mon Oct 06 20:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added some more info on UnixEnv$<program name>$sfix.
	* unixlib/local.h: Allocated __RISCOSIFY_STRICT_UNIX_SPECS
	  __riscosify_control bit to disable the RISC OS filename check in
	  __riscosify[_std]().
	* source/common/objattr.c (__object_get_attrs): incorrect dealing with
	  filetype derived from Unix filename.
	* source/common/riscosify.c (guess_or_null): Support for
	  __RISCOSIFY_STRICT_UNIX_SPECS.
	* source/unix/chdir.c (chdir): Disable suffix swapping for directories.
	* source/unix/dev.c (__fsstat): Likewise.
	* source/unix/dirent.c (opendir): Likewise.
	* source/unix/mkdir.c (mkdir): Likewise.
	* source/unix/rmdir.c (rmdir): Likewise.

Tue Sep 30 18:38:25 2003  Alex Waugh <alex@alexwaugh.com>

	* alloc.c: Use __riscos rather than __riscos__ to keep Norcroft happy.

Tue Sep 18 23:40:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Added comment on Norcroft's "shrinkwrap bug".

Tue Aug 19 00:34:27 2003  John Tytgat  <John.Tytgat@aaug.net>

	* .cvsignore: MKDir,feb removed.  We don't generate this anymore.
	* gen-makefiles.pl: No longer generating MKDir,feb but include a .INIT
	  section in the objs\Makefile,fe1 file; Also adding a "This file is
	  automatically generated by gen-makefiles.pl" comment line.
	* Docs/ReadMe: Added info on RISCOS Ltd.'s UnixLib, sfix feature,
	  __dynamic_no_da & __dynamic_da_name WEAK symbols.
	* objs/Makefile.in: Added .INIT section.  The rest will be added by
	  gen-makefiles.pl.
	* clib/unixlib/features.h: Added definition for __dynamic_no_da and
	  __dynamic_da_name WEAK symbols.
	* common/_exist.s (__set_feature_imagefs_is_file): This commented out
	  routine contained a copy/paste error.
	* common/stat.c: Removed compiler warning.
	* common/unixify.c: Take only MimeMap into account when
	  __RISCOSIFY_FILETYPE_NOT_SET is not set.
	* unix/dirent.c: Don't generate ,xyz filetype extention when MimeMap
	  has to be taken into account (i.e. when __RISCOSIFY_FILETYPE_NOT_SET
	  is not set).
	* unix/features.c: Made __sfix_default non writable; get_program_name()
	  no longer corrupts fname_buf for very long program names.
	* common/riscosifyc.c: Removed.  It shouldn't be necessary.

Fri Aug 15 16:13:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* clib/unixlib/features.h: _feature_imagefs_is_file is now a WEAK
	symbol. Added routines __get_feature_imagefs_is_file() and
	__set_feature_imagefs_is_file() for internal purposes. Default value
	is 0. Patch from Stefan Bellon.
	* common/_exist.s: Likewise.
	* unix/dev.c: Likewise.
	* unix/features.c: Likewise.
	* unix/unlink.c: Likewise.
	* Docs/ReadMe: Added info on the WEAK'ly defined symbols.

Sun Aug 03 18:14:27 2003  John Tytgat  <John.Tytgat@aaug.net>

  	* common/unixify.c (__unixify): filetype extension code will first look
  	if the filetype can't be derived from the filename extension
	& MimeMap.  If so, then there won't be a filetype extension added to
	the filename.  Also, __unixify wrongly returned the end of the buffer
	(instead of the start) when the filetype extension code got activated.
  	* unix/unix.c: Disabled debug
  	* wchar/btowc.c: ANSI prototyping.
  	* wchar/mbrlen.c: Likewise.
  	* wchar/mbsinit.c: Likewise.
  	* wchar/wcsdup.c: Likewise.
  	* wchar/wctob.c: Likewise.
  	* wchar/wmemcpy.c: Likewise.
  	* wchar/wmemmove.c: Likewise.

Thu Jul 31 20:55:32 2003  Alex Waugh <alex@alexwaugh.com>

	* common/_riscosify.s: Fix typo.

Wed Jul 30 00:03:42 2003  Nick Burrett  <nick@dsvr.net>

	* stdarg.h: Force GCC to use its own internal header.
	(__gnuc_va_list): Define for all other target types.

	* varargs.h: Header is now obsolete.  Add #error lines; remove
	all other code.

	* stdio.h (fopen, freopen, fputs): Add __restrict pointer qualifier.
	(vsprintf, vfprintf, vprintf): Likewise.  Use __gnuc_va_list.
	(sprintf, fprintf, printf, sscanf, fscanf, scanf): Likewise.
	(vsnprintf): Likewise.  Add GCC __format__ attributes.
	(snprintf, vscanf, vfscanf, vsscanf): Likewise.

	* sys/syslog.h (syslog): Add GCC __format__ attribute.
	(vsyslog): Likewise.  Use __gnuc_va_list.

	* assert.c (__assert_fail): Fix compiler warning.

	* alloca.h: Get only the definition of size_t.
	* complex.h (_Complex_I): Add __extension__.

	* dirent.h: Add __restrict pointer qualifier to functions.
	* glob.h: Likewise.
	* grp.h: Likewise.
	* inttypes.h: Likewise.
	* pthread.h: Likewise.
	* pwd.h: Likewise.
	* regex.h: Likewise.
	* signal.h: Likewise.
	* stdio.h: Likewise.
	* stdlib.h: Likewise.
	* string.h: Likewise.
	* time.h: Likewise.
	* unistd.h: Likewise.

Mon Jun 23 21:10:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* MKDir,fe1: Removed objs.clib & objs.clib.o directory creation.
	* objs/Makefile.in: APCS-R builds are no longer supported.
	* source/clib/getopt.h: Full prototyping for getopt(), we don't have
	  other definitions in other libraries.
	* source/clib/setjmp.h: Added __executing_signalhandler and
	  __pthread_worksemaphore to jmp_buf; Added
	  saved_currently_handling to sigjmp_buf.
	* source/clib/unixlib/asm_dec.s: APCS-R builds are no longer supported;
	  __get_errno macros doesn't need an assert on its registers.
	* source/clib/unixlib/unix.h: Removed comment on __fpflag usage in
	  setjmp() and longjmp() (as we're minimally need FPE 4.00 now).
	* source/pthread/_context.s: APCS-R builds are no longer supported.
	* source/pthread/_yield.s: Likewise.
	* source/signal/_coredump.s: Likewise.
	* source/signal/sigexec.s: Likewise.
	* source/signal/_signal.s: Removed unnecessary IMPORT |_exit|.
	* source/sys/_jmp.s: Added __executing_signalhandler and
	  __pthread_worksemaphore to jmp_buf struct.
	* source/sys/_syslib.s: APCS-R builds are no longer supported; Moved
	  __unixlib_fatal from unix.c to here and use __signalhandler_xx
	  as stack parameters as you might not have a valid one.
	* source/sys/sigsetjmp.c: Support for saved_currently_handling in
	  sigjmp_buf.
	* source/unix/unix.c(__unixlib_fatal): Moved to _syslib.s and added
	  explicit stack setup.

Mon Jun 23 10:31:08 2003  Peter Naulls  <peter@chocky.org>

	* source/unix/fcntl.c: Patches missed from 2.95 trunk.
	  Fix use of O_EXECCL flag, and add F_SETOWN stub.

Fri Jun 20 00:50:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/errno.h (__ul_errbuf): Not a char* but a struct
	  definition.
	* source/signal/_signal.s (_kernel_last_oserror): Small optimisation.
	* source/signal/post.c: Removed the non used extern definitions.
	* source/sys/_jmp.s: Added some comments.
	* source/sys/_os.s (__os_prdec): Stack ptr needs to be decreased
	  during the complete routine call.
	* source/sys/errlist.c: Using struct __ul_errbuf member.

Tue Jun 17 20:45:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/local.h: Removed obsolete __RISCOSIFY_DROP_VOWEL.

Tue Jun 17 00:09:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/local.h: Removed obsolete uname().  Use
	  riscosify[_std]() instead.  Removed obsolete *_TRUNCATE bits in
	  __riscosify_control.  Changed __RISCOSIFY_FILETYPE_SET into
	  __RISCOSIFY_FILETYPE_NOT_SET so that the current default value
	  __riscosify_control becomes 0 again.  Hide __get_riscosify_control()
	  behind __UNIXLIB_INTERNALS.  Defined __set_riscosify_control().
	* source/common/_riscosify.s: Defined __set_riscosify_control().
	* source/common/objattr.c: Changed __RISCOSIFY_FILETYPE_SET into
	  __RISCOSIFY_FILETYPE_NOT_SET.
	* source/common/riscosify.c: Likewise.
	* source/common/uname.c: Removed.
	* source/common/riscosifyc.c: Added comment that __riscosify_control
	  is a weak symbol.
	* source/common/serial.c: Changed comment about obsoleted __uname().
	* source/stdio/rename.c: Likewise.
	* source/unix/features.c: Removed initialisation of __riscosify_control
	  as the default value is again 0 in which is initialised in
	  source/common/riscosifyc.c.  Make use of __set_riscosify_control()
	  when the "nonametrans" feature is defined.

Mon Jun 16 22:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/signal.h: Changed SISERR into SISOSERROR in order to
	  be compatible with SharedCLibrary.
	* source/clib/unixlib/asm_dec.s: Likewise.
	* source/signal/_signal.s: Likewise.
	* source/signal/signame.c: Likewise.
	* source/sys/exec.c: Likewise.

Sat Jun  7 09:31:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_alloca.s: Fix non 32bit code.

Sat Jun  7 04:20:04 2003  John Tytgat  <John.Tytgat@aaug.net>

	* .cvsignore: Added MKDir,feb
	* gen-makefiles.pl: Removed cdir of objs.clib.o
	* objs/.cvsignore: Added Makefile,fe1
	* source/clib/string.h: Renamed __strnlen() into strnlen()
	* source/clib/time.h: Renamed localtime_p() into localtime_r()
	* source/clib/sys/cdef.h: Added #undef __ptr_t
	* source/clib/sys/features.h: Likewise.
	* source/common/objattr.c: Removed unused variables.
	* source/common/riscosify.c: Likewise.
	* source/signal/post.c: Likewise.
	* source/unix/chmod.c: Likewise.
	* source/unix/fstat.c: Likewise.
	* source/signal/sigvec.c: wrapper_handle() and convert_mask() are not
	  used.
	* source/sys/errlist.c: Cast away return param __set_errno().

Sun Jun  1 21:46:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/unistd.h (fchdir): Add decl.
	* unistd/fchdir.c: New file.
	* unix/fchown.c: Remove file, it duplicates unistd/fchown.c

Sun Jun  1 18:20:15 2003  Alex Waugh  <alex@alexwaugh.com>

	* module/sul.s: Fix non 32bit SWI returns.

Mon May 26 19:47:04 2003  Peter Naulls  <peter@chocky.org>
	* clib/wchar.h: __mbrtowc and __mbrlen don't exist - avoid
	  inline mbrlen.

Mon May 26 18:26:03 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread/create.c (__pthread_create): Initialise the saved SPSR.
	* pthread/init.c (mainthread): Fix linkage.
	* pthread/testcancel.c (pthread_testcancel): Don't cancel if
	  context switching is disabled.

Sun May 25 22:44:12 2003  Alex Waugh  <alex@alexwaugh.com>

	* MKDir,feb: Remove file, now autogenerated.
	* Makefile: Remove file, now autogenerated.
	* Makefile.in: Template for Makefile.
	* gen-makefiles.pl: Script to generate Makefiles.
	* Docs/ReadMe: Add section on stub functions.
	* Docs/stub: Remove file.
	* objs/Makefile,fe1: Remove file, now autogenerated.
	* objs/Makefile.in: Template for Makefile.
	* source/Makefile: Remove file, now autogenerated.
	* source/Makefile.in: Template for Makefile.
	* source/netlib/socketpair.c: Add #includes and casts for Norcroft.
	* source/regex.c: Likewise.
	* source/signal/sigvec.c: Comment out bits that don't compile.
	* source/unix/link.c: Remove file. Duplicates functions in unistd/*link.c
	* source/wchar/wcstod.c: Add dummy function so it compiles.
	* source/wchar/wcstof.c: Likewise.
	* source/wchar/wcstol.c: Likewise.
	* source/wchar/wcstold.c: Likewise.

Sun May 18 18:04:16 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add lrintf.c and llrintf.c
	* source/Makefile: Likewise.
	* source/clib/math.h: Add decls.
	* source/math/llrintf.c: New file from glibc 2.3.1
	* source/math/lrintf.c: Likewise.

Wed May 14 00:01:05 2003  John Tytgat  <John.Tytgat@aaug.net>

	* netlib/_accept.s, netlib/_getpeerna.s, netlib/_getsockna.s,
	  netlib/_recvfrom.s, netlib/_recvmsg.s, netlib/_sendmsg.s:
	  Readded COMPAT_INET4 macros undoing Peter's change at 21 Apr 2003.
	* netlib/_net_error.s: typo spoiled the error numbers returned from the
	  Internet SWI calls.
	* unix/dev.c: Remove unused variables.  Added #include <ctype.h>.
	* unix/mkdir.c: Remove unused variable.
	* unix/rmdir.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Wrote corrupted RISC OS filetype.
	* !Help: Updated.
	* Docs/ReadMe: Added "Compile-time features" section.

Tue May 13 22:46:38 2003  Alex Waugh  <alex@alexwaugh.com>

	* math-asm/_acosf.s: Keep sp valid at all times.
	* math-asm/_asinf.s: Likewise.
	* math-asm/_atanf.s: Likewise.
	* math-asm/_ceilf.s: Likewise.
	* math-asm/_cosf.s: Likewise.
	* math-asm/_coshf.s: Likewise.
	* math-asm/_expf.s: Likewise.
	* math-asm/_floorf.s: Likewise.
	* math-asm/_ldexpf.s: Likewise.
	* math-asm/_log10f.s: Likewise.
	* math-asm/_logf.s: Likewise.
	* math-asm/_modf1f.s: Likewise.
	* math-asm/_sinf.s: Likewise.
	* math-asm/_sinhf.s: Likewise.
	* math-asm/_tanf.s: Likewise.
	* math-asm/_tanhf.s: Likewise.

Tue May 13 21:51:36 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add getopt1.c
	* source/Makefile: Likewise.
	* source/clib/unixlib/features.h: Define __GNU_LIBRARY__
	* source/clib/getopt.h: Replace with file from glibc 2.3.1
	* source/unix/getopt.c: Likewise.
	* source/unix/getopt1.c: New file from glibc 2.3.1

Sun May 11 22:01:15 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_os.s (__os_file, __os_fread, __os_fwrite, __os_args): Store a1
	  before clearing it.

Sun May 11 19:13:12 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Specifying minimum Norcroft C version 5.53.
	* clib/unixlib/features.h: Avoid double #define's when project header
	  files #define things like __attribute__ & friends themselves.
	* source/signal/_signal.s: Removed "IMPORT __pthread_callback_pending"
	  (didn't exist).
	* source/sys/_syslib.s: Removed "IMPORT __h_upcall" (didn't exist).

Sun May 11 13:28:12 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/chdir.c (chdir): chdir(".") did not work when Prefix$Dir
	  was defined.
	* objs/.cvsignore: Added.  Lets CVS ignore all derived objects when
	  using the Norcroft compiler.
	* source/clib/.cvsignore: Added.  Lets CVS ignore the created UnixLib
	  library object file.

Wed May  7 23:07:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/pthread.h (__pthread_key): Add a union for value, to avoid
	  const issues.
	* pthread/key.c: Use union to prevent const warning.
	* pthread/keydest.c: Likewise.
	* pthread/_ints.s: Preserve PSR bits of PC based on processor mode,
	  not APCS variant.
	* sys/_alloca.s: Likewise.
	* sys/_syslib.s: Likewise.

Tue May  6 23:29:21 2003  Alex Waugh  <alex@alexwaugh.com>

	* riscos-dist/Makefile: Remove !MKDir from binary !unixlib,
	  add !Setup to source !unixlib.
	* unixlib/objs/Makefile,fe1: Add missing files.
	* unixlib/source/Makefile: Add ffs files.
	* clib/string.h: Enable ffs decls.
	* clib/strings.h: Likewise.
	* string/ffs.c: New file implementing ffs().
	* string/ffsll.c: New file implementing ffsll().

Sat May  3 12:20:14 2003  Alex Waugh  <alex@alexwaugh.com>

	* signal/_signal.s: Move IMPORTs earlier in file for objasm.
	* resolv/res_hconf.c: Remove unneeded ;

Tue Apr 29 22:14:12 2003  Alex Waugh  <alex@alexwaugh.com>

	* unixlib/features.h: Don't pollute the userland namespace
	  with internal_function or weak_function.
	* sys/cdefs.h: Likewise.

Tue Apr 29 20:37:46 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s: Require FPEmulator 4.00 or higher
	* sys/_jmp.s: Remove STFE/LDFE code as SFM/LFM is available for
	  FPE >= 4.00
	* pthread/_context.s: Likewise.

Mon Apr 28 23:42:26 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_os.s: Don't rely on flags being preserved across SWI calls.
	* sys/_syslib.s: Likewise.

Mon Apr 28 22:03:02 2003  Alex Waugh  <alex@alexwaugh.com>

	* Makefile: Remove fcrypt.c
	* fcrypt.c: Remove file, it has been replaced by crypt/*
	* opensock.c: Enable locking code for thread safety.
	* regex.c: Add standard UnixLib header.
	* system.c: Add cancellation point.
	* clib/bits/libc-lock.h: New file to map __libc_lock calls onto
	  pthread mutexes.
	* crypt/crypt_util.c: Enable locking code for thread safety.
	* netlib/accept.c: Thread safety patches.
	* netlib/bind.c: Likewise.
	* netlib/connect.c: Likewise.
	* netlib/getpeernam.c: Likewise.
	* netlib/getsocknam.c: Likewise.
	* netlib/getsockopt.c: Likewise.
	* netlib/listen.c: Likewise.
	* netlib/net.c: Likewise.
	* netlib/proto.c: Likewise.
	* netlib/recv.c: Likewise.
	* netlib/recvfrom.c: Likewise.
	* netlib/recvmsg.c: Likewise.
	* netlib/send.c: Likewise.
	* netlib/sendmsg.c: Likewise.
	* netlib/sendto.c: Likewise.
	* netlib/serv.c: Likewise.
	* netlib/setsockopt.c: Likewise.
	* netlib/shutdown.c: Likewise.
	* netlib/socket.c: Likewise.
	* netlib/socketpair.c: Add standard UnixLib header.
	* resolv/res_hconf.c: Enable locking code for thread safety.
	* signal/_signal.s: Thread safety patches.
	* signal/kill.c: Likewise.
	* signal/pause.c: Likewise.
	* signal/post.c: Likewise.
	* signal/sigaction.c: Likewise.
	* signal/sigaltstk.c: Likewise.
	* signal/sigpause.c: Likewise.
	* signal/sigpending.c: Likewise.
	* signal/sigprocmsk.c: Likewise.
	* signal/sigstack.c: Likewise.
	* signal/sigsuspend.c: Likewise.
	* signal/sigvec.c: Likewise.
	* signal/sleep.c: Likewise.
	* sys/brk.c: Likewise.
	* sys/debug.c: Likewise.
	* sys/execvp.c: Likewise.
	* sys/mman.c: Likewise.
	* sys/sigsetjmp.c: Likewise.
	* unix/waitpid.c: Likewise.

Mon Apr 28 13:05:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/pthread.h (__pthread_context_stack_sp,
	  __pthread_context_stack_sl): Remove.
	* clib/unixlib/asm_dec.s: Add CHGMODE macro to simplify changing
	  processor modes.
	* pthread/_ints.s (__pthread_unprotect_unsafe): Preserve a2, don't
	  yield if we are in the middle of a context switch.
	* pthread/_yield.s (pthread_yield): Improve reliability by calling
	  the context switcher directly rather than setting a callback.
	* pthread/cond.c: Formatting.
	* pthread/init.c (__pthread_init): Don't setup a stack for context
	  switcher (now uses signal handler stack).
	* pthread/lock.c: Fix typos.
	* pthread/once.c: Fix typo.
	* pthread/testcancel.c: Fix line endings in debug code.
	* signal/_signal.s, pthread/_context.s: Use a dedicated stack
	  for all signal handlers and pthread context switcher.
	  Make pthreads more tolerant of extra or missing callbacks.
	  Restore CPSR on exit from a callback.
	* sys/_syslib.s: Initialise signal handler stack.

Sun Apr 27 13:31:44 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/chdir.c: Code failed when chdir() was done for a
	  subdirectory in the CSD.

Sat Apr 26 11:36:00 2003  Peter Naulls  <peter@chocky.org>
	* source/signal/signal.c, source/signal/post.c:
	  Add _GNU_SOURCE define, to allow use of sighandler_t.
	* source/strtod.c: Add an explicit atof function (as well
	  as the existing #define)

Fri Apr 25 15:14:29 2003  Peter Naulls  <peter@chocky.org>
	* clib/sys/cdefs.h: Added, from a patch by John T.  Didn't create
	  the needless misc directory in use with that, however.
	* clib/stddef.h: Add _WCHAR_T and _WINT_T defines as per glibc.
	* clib/signal.h: Add __USE_GNU wrapper to sighandler_t typedef.

Fri Apr 25 00:32:18 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Forgot to specify APCS 3/32bit for assembler.
	* source/netlib/timeofday.c: Removed (duplicate of
	  source/time/gettod.c)
	* source/Makefile: Added fcrypt.c, strtoimax.c, strtoumax.c to OBJS.
	* source/time/gettod.c: Increased time results from sec to centi secs.
	* source/clib/stdlib.h (strtoll, strtoull): enable it for Norcroft
	  builds.
	* source/resolv/gethnamaddr.c(gethostbyname2): timeout in the resolver
	  requests will result in hosts file lookup.

Tue Apr 22 11:57:14 2003  Peter Naulls  <peter@chocky.org>
	* clib/stddef.h: Remove ptr_t.  Not defined in glibc, and
	  sometimes clashes in programs.
	* clib/unixlib/local.h: Fix typo.  Move stddef.h include -
	  size_t required by non UnixLib internal functions.

Mon Apr 21 16:48:12 2003  Peter Naulls  <peter@chocky.org>
	* source/Makefile: Added _longlong.s to SYS_ASM.
	* objs/Makefile,fe1: Add missing setsid, and _longlong.
	* source/sys/_longlong.s: Added (long long Norcroft helper routines,
	  from John Tytgat's addition)
	* source/unistd/getpass.c: define _GNU_SOURCE for getline().

Mon Apr 21 14:18:04 2003  Peter Naulls  <peter@chocky.org>
	* clib/unistd.h, resource/setsid.c: Dummy setsid implementation.
	* Makefile: prevent library being created 3 times.

Mon Apr 21 08:40:33 2003  Peter Naulls  <peter@chocky.org>
	* objs/Makefile,fe1: Change APCS flags to 32-bit
	* clib/unixlib/asm_dec.s: Extra definitions for 32-bit,
	  make networking macros 32-bit.
	* netlib/_accept.s, netlib/_getpeerna.s, netlib/_getsockna.s,
	  netlib/_recvfrom.s, netlib/_recvmsg.s, netlib/_sendmsg.s:
          Remove unused macro silliness
	* netlib/_net_error.s: 32-bit
	* netlib/serv.c: Fix typo
	* signal/_coredump.s, signal/_signal.s, signal/post.c:
	  32-bit, move much of the handling into C for ease of maintainence.
	* sys/_swi.s, sys/_syslib: 32-bit

Sat Apr 13 17:20:43 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/stdio.h: Thread safety patches.
	* stdio/clearerr.c: Likewise.
	* stdio/fclose.c: Likewise.
	* stdio/feof.c: Likewise.
	* stdio/ferror.c: Likewise.
	* stdio/fflush.c: Likewise.
	* stdio/fgets.c: Likewise.
	* stdio/filbuf.c: Likewise.
	* stdio/fileno.c: Likewise.
	* stdio/flsbuf.c: Likewise.
	* stdio/fopen.c: Likewise.
	* stdio/fpos.c: Likewise.
	* stdio/fputs.c: Likewise.
	* stdio/fread.c: Likewise.
	* stdio/freopen.c: Likewise.
	* stdio/fwrite.c: Likewise.
	* stdio/getc.c: Likewise.
	* stdio/getdelim.c: Likewise.
	* stdio/gets.c: Likewise.
	* stdio/getw.c: Likewise.
	* stdio/newstream.c: Likewise.
	* stdio/popen.c: Likewise.
	* stdio/printf.c: Likewise.
	* stdio/putc.c: Likewise.
	* stdio/puts.c: Likewise.
	* stdio/putw.c: Likewise.
	* stdio/rename.c: Likewise.
	* stdio/scanf.c: Likewise.
	* stdio/setbuf.c: Likewise.
	* stdio/tmpfile.c: Likewise.
	* stdio/ungetc.c: Likewise.
	* unistd/fchown.c: Likewise.

Sat Apr 12 12:32:53 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add new file
	* Makefile: Likewise.
	* clib/sys/stat.h (__stat): Alter decl.
	* clib/unixlib/local.h (__object_get_attrs, __object_set_attrs):
	  Add decl.
	* clib/unixlib/swiparams.h: Add more OS_File parameters.
	* common/stat.c (__stat): Take named arguments rather than a
	  register list.
	* unix/chdir.c (chdir): Remove common code.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsstat): Likewise.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/rmdir.c (rmdir): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* common/objattr.c: New file containing common code for the above
	  files. Fix bug that could cause stat to return ENOENT for a file
	  where the filetype didn't match the extension mimetype lookup.

Mon Apr  7 21:09:46 2003  Alex Waugh  <alex@alexwaugh.com>

	* Makefile: Add -pedantic to assembly rule.
	* common/_riscosify.s: Add missing END directive.

Sun Apr  6 22:48:08 2003  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dirent.c: Norcroft C breaks on an int64 switch argument
	  since __off_t has been changed to 64 bits.  Void'ing or using
	  the return parameter of __set_errno() to reduce warnings.
	* !MKDir: Removed, an up-to-date copy is MKDir.

Sun Apr  6 15:03:26 2003  Peter Naulls  <peter@chocky.org>

	* source/netlib/socketpair.c: socketpair() implementation
	* source/clib/regex.h, source/regex.c: regex implementation
	* source/Makefile: Add new files
	* source/clib/stdio.h: Add fseeko/ftello, wrap GNU only
	  functions up as per glibc.
	* source/stdio/fpos.c: fseeko/ftello implementation
	* source/clib/unixlib/unix.h: Add __32bit variable
	  reference (not implemented yet)
	* source/common/riscosify.c: Add hard/soft space mapping
	* source/module/sul.s: SharedUnixLibrary 1.02 update
	* source/unix/dev.c: Add ttyS0, add FIOASYNC (from 2.95.4 branch)
	* source/unix/tty.c: Check for ttyS0, and alias to rs423
	* source/clib/unixlib/types.h: Remove rouge +

Sun Apr  6 13:22:00 2003  Peter Naulls  <peter@chocky.org>

	* clib/swis.h: Include kernel.h, add new CDFS SWI.
	* clib/unixlib/types.h: LCC support, change __off_t to
	  64 bits for consistency with other types in UnixLib.
	  Minor tidying to UnixLibify.

Sun Apr  6 12:48:17 2003  Peter Naulls  <peter@chocky.org>

	* Help: Remove extra help file, and just use !Help

Sat Apr  6 11:54:16 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread.h (__pthread_running_threads): Renamed to
	  __pthread_num_running_threads.
	* pthread/context.c: Likewise.
	* pthread/create.c: Likewise.
	* pthread/exit.c: Likewise.
	* pthread/init.c: Likewise.
	* pthread/_context.s: Likewise, add missing IMPORT.

Sun Apr  6 01:00:57 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/bits/netdb.h: Removed _gethostbyname() and
	  _gethostbyaddr() definition
	* source/netlib/_hostbyadd.s: Removed.
	* source/netlib/_hostbynam.s: Removed.
	* source/netlib/host.c: Removed.
	* source/Makefile: Removed _hostbyadd.o & _hostbynam.o from
	  NETLIB_ASM list.  Removed host.o from NETLIB list.
	* objs/Makefile: Likewise.
	* source/sys/_udiv10.s (_kernel_udiv10, __rt_udiv10): Made routine
	  2 instructions shorter.
	* source/sys/_sdiv10.s (_kernel_sdiv10, __rt_sdiv10): Likewise.

Sat Apr  5 13:41:35 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread.h (PTHREAD_INIT): Remove.
	* pthread/_context.s (__pthread_start_ticker): Don't start ticker if
	  there is only one thread running.
	* pthread/atfork.c (pthread_atfork): Remove unneeded initialisation.
	* pthread/cleanup.c (__pthread_cleanup_push): Likewise.
	(__pthread_cleanup_pop): Likewise.
	* pthread/cond.c (pthread_cond_timedwait): Likewise.
	* pthread/context.c (__pthread_running_threads): Change default to 1
	  running thread.
	* pthread/create.c (pthread_create): Start the ticker every time a
	  thread is created.
	* pthread/exit.c (pthread_exit): Stop the ticker if there is only one
	  thread left.
	* pthread/init.c (__pthread_init): Don't start the ticker on
	  initialisation.
	* pthread/join.c (pthread_join): Remove unneeded initialisation.
	* pthread/lock.c (__pthread_lock_lock, __pthread_lock_unlock): Likewise.
	* pthread/mutex.c (pthread_mutex_trylock, pthread_mutex_lock): Likewise.
	* pthread/rwlock.c (pthread_rwlock_rdlock, pthread_rwlock_wrlock,
	  pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock): Likewise.
	* pthread/self.c (pthread_self): Likewise.

Sat Apr  5 13:14:30 2003  Alex Waugh  <alex@alexwaugh.com>

	Allow malloc or stack extention to increase the wimpslot.
	* Makefile: Compile sys/brk.c without stack checking.
	* alloc.c: Update to 2.7.2 of Doug Lea's malloc.
	* clib/unistd.h (brk, sbrk): add deprecated attribute.
	(__internal_sbrk): Add decl.
	* clib/unixlib/asm_dec.s (__4K_BOUNDARY): Remove.
	(XWimp_SlotSize): Add SWI number.
	* clib/unixlib/features.h (__4K_BOUNDARY): Remove.
	(__DA_WIMPSLOT_ALIGNMENT): Add.
	* clib/unixlib/unix.h (__real_himem): Add.
	(__stackalloc_incr_wimpslot): Add decl.
	* resource/initialise.c (__resource_initialise): Try to determine the
	  maximum possible wimpslot size.
	* sys/_exec.s (__exec_s3, __exlen): Remove __4K_BOUNDARY code.
	* sys/_syslib.s (__main): Remove __4K_BOUNDARY code, read current
	  wimpslot size on startup, move stackalloc initialisation to after
	  the environment handlers are setup, restore RISC OS environment
	  handlers on exit.
	(__env_riscos_and_wimpslot): New function.
	(__env_riscos): Don't alter wimpslot size.
	(__real_himem): Add.
	* sys/_vfork.s (return_parent): Remove debug code.
	* sys/brk.c (__internal_brk): Renamed from brk, try to increase
	  wimpslot if needed.
	(brk): Call __internal_brk
	(sbrk): Call __internal_brk
	(__internal_sbrk): New function.
	* sys/exec.c (__ushift, __dshift, execve): Cope with a non-contiguous
	  heap, remove __4K_BOUNDARY code, don't reread environment handlers.
	* sys/stackalloc.c (__stackalloc_incr_wimpslot): New function.
	(__stackalloc_incr_upwards): New function.
	(__stackalloc_incr_downwards): New function.
	(__stackalloc_incr): Remove function.
	(__stackalloc_init, __stackalloc): Allow a non-contiguous heap, and
	  wimpslot extension.
	* unix/unix.c (_exit): Don't restore RISC OS environment, now done in
	  _syslib.s instead.

Sat Apr  5 10:33:45 2003  Alex Waugh  <alex@alexwaugh.com>

	Thread safety patches
	* termios/ctermid.c: Changed.
	* termios/cuserid.c: Changed.
	* termios/tcgetattr.c: Changed.
	* time/asctime.c: Changed.
	* time/ctime.c: Changed.
	* time/setitmr.c: Changed.
	* time/stdtime.c: Changed.
	* time/tzset.c: Changed.
	* wchar/mbrlen.c: Changed.
	* wchar/mbrtowc.c: Changed.
	* wchar/wcrtomb.c: Changed.
	* unix/close.c: Changed.
	* unix/dirent.c (readdir_r): Fix return values
	(invalidate, newstream): Thready safety
	* unix/fchmod.c: Changed.
	* unix/fcntl.c: Changed.
	* unix/fstat.c: Changed.
	* unix/getcwd.c: Changed.
	* unix/getenv.c: Changed.
	* unix/gethostnam.c: Changed.
	* unix/getopt.c: Changed.
	* unix/ioctl.c: Changed.
	* unix/isatty.c: Changed.
	* unix/ispipe.c: Changed.
	* unix/lseek.c: Changed.
	* unix/open.c: Changed.
	* unix/pathconf.c: Changed.
	* unix/pipe.c: Changed.
	* unix/poll.c: Changed.
	* unix/proc.c: Changed.
	* unix/read.c: Changed.
	* unix/readv.c: Changed.
	* unix/reopen.c: Changed.
	* unix/select.c: Changed.
	* unix/setenv.c: Changed.
	* unix/stat.c: Changed.
	* unix/sync.c: Changed.
	* unix/syslog.c: Changed.
	* unix/truncate.c: Changed.
	* unix/tty.c: Changed.
	* unix/umask.c: Changed.
	* unix/unix.c: Changed.
	* unix/wait.c: Changed.
	* unix/wait4.c: Changed.
	* unix/write.c: Changed.
	* unix/writev.c: Changed.

Sat Apr  5 10:12:54 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s (free_stack_chunk): Preserve a2 as
	  it is used for returning 64bit results from functions

Fri Apr  4 22:51:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* asm_dec.s (__set_errno, __get_errno): Revert back to using
	  global errno

Wed Jan 29 18:51:20 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile: crypt rules had a spurious column chars at the end
	  of their lines
	* unix/dev.c (_randomread): cast 'data' ptr to int is necessary
	  for Norcroft.
	* math-asm/_atan.s: atan1 should be exported, not atanl.
	* stdint.h: Added #include <unixlib/features.h> for the
	  __extension__ definition
	* objs/Makefile: crypt rules did have a spurious column chars;
	  Removed netlib.o.htonl, netlib.o.htons, netlib.o.ntohl,
	  and netlib.o.ntohs from NETLIB_ASM list; Removed
	  netlib.o.inet_addr and netlib.o.inet_aton from NETLIB list;
	  Add Resolv src code; Added pthread.o.newnode to the PTHREAD
	  list; Add pthread.o._exit to the PTHREAD_ASM list
	* MKDir: Added cdir of objs.resolv and objs.resolv.o.
	* arpa/nameser.h: typo in the NS_PUT16() macro

Wed Jan 29 18:48:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* unistd.h (__unlinksuffix): Add decl.
	* common/_exist.s (__isdir_raw): Change result according to
	setting of __feature_imagefs_is_file.
	* stdio/rename.c (rename): Delete file, then attempt to delete
	suffix directory if nothing else exists within it.
	* unix/dev.c (__fsclose): Likewise.
	* unix/unlink.c (__unlinksuffix): New function.
	(unlink): Account for setting of __feature_imagefs_is_file.

Wed Jan 29 18:43:32 2003  Alex Waugh  <alex@alexwaugh.com>

	* unix/dev.c (__randomopen): Attempt to load the CryptRandom
	module if it doesn't appear to be installed already.

Tue Jan 21 18:03:28 2003  Nick Burrett  <nick@dsvr.net>

	* grp.h (__grpread): Add buf and buflen arguments to prototype.
	* pwd.h (__pwdread): Likewise.

Tue Jan 21 17:56:18 2003  Alex Waugh  <alex@alexwaugh.com>

	Thread safety patches
	* common/fdname.c: Changed.
	* common/sockvalid.c: Changed.
	* common/uname.c: Changed.
	* locale/ctypetable.c: Changed.
	* locale/localeconv.c: Changed.
	* locale/setlocale.c: Changed.
	* math/lgamma.c: Changed.
	* stdlib/_rand48.c: Changed.
	* stdlib/erand48.c: Changed.
	* stdlib/jrand48.c: Changed.
	* stdlib/lcong48.c: Changed.
	* stdlib/lrand48.c: Changed.
	* stdlib/mrand48.c: Changed.
	* stdlib/nrand48.c: Changed.
	* stdlib/rand.c: Changed.
	* stdlib/random.c: Changed.
	* stdlib/seed48.c: Changed.
	* stdlib/srand48.c: Changed.
	* pwd/fgetpwent.c: Changed.
	* pwd/fgetpwentr.c: Changed.
	* pwd/getlogin.c: Changed.
	* pwd/getpwent.c: Changed.
	* pwd/getpwnam.c: Changed.
	* pwd/getpwnam_r.c: Changed.
	* pwd/getpwuid.c: Changed.
	* pwd/getpwuid_r.c: Changed.
	* pwd/pwdread.c: Changed.
	* resource/seteuid.c: Changed.
	* resource/setgid.c: Changed.
	* resource/setpgrp.c: Changed.
	* resource/setprior.c: Changed.
	* resource/setrlimit.c: Changed.
	* resource/setuid.c: Changed.
	* grp/fgetgrent.c: Changed.
	* grp/fgetgrentr.c: Changed.
	* grp/getgrent.c: Changed.
	* grp/getgrgid.c: Changed.
	* grp/getgrgid_r.c: Changed.
	* grp/getgrnam.c: Changed.
	* grp/getgrnam_r.c: Changed.
	* grp/getgroups.c: Changed.
	* grp/grpread.c: Changed.

Tue Jan 21 17:49:27 2003  Alex Waugh  <alex@alexwaugh.com>

	Provide /dev/random and /dev/zero emulation.
	* swis.h (CryptRandom_*): Add CryptRandom module SWIs.
	* unixlib/dev.h (DEV_ZERO): Add.
	(DEV_RANDOM): Add.
	(NDEV): Bump to 7.
	(struct dev): Add stat and fstat.
	(__getdevtype): Add prototype.
	(__fsstat): Add prototype.
	(__fsfstat): Add prototype.
	(__nullstat, __nullfstat, __zeroread, __randomopen): Likewise.
	(__randomread): Likewise.
	* unix/dev.c (__dev): Support new fields in struct dev.
	(struct sfile): New.
	(__sfile): New.
	(__getdevtype): New function.
	(__fsstat): New function.
	(__fsfstat): New function.
	(__nullstat): New function.
	(__nullfstat): New function.
	(__zeroread): New function.
	(__randomopen): New function.
	(__randomread): New function.
	* unix/fstat.c (fstat): Call fstat function from struct dev.
	* unix/open.c (struct file): Moved to unix/dev.c.
	(__sfile): Moved to unix/dev.c.
	* unix/stat.c (stat): Call stat function from struct dev.

Sun Jan  5 12:44:20 2003  Alex Waugh  <alex@alexwaugh.com>

	* common/riscosify.c:
	"./foo.c" now translates to "@.c.foo" rather than "c.foo"
	Better handling of . and .. at beginning and ends of filenames, and
	things like "./.."
	Removes ,xyz when the filename is just a leafname.
	Interprets ".svn/text-base/malloc.c.svn-base" as unix format
	not RISC OS format.

Sun Jan  5 12:41:31 2003  Alex Waugh  <alex@alexwaugh.com>

	Make UnixLib thread-safe.
	* abort.c (abort): Add PTHREAD_UNSAFE
	* assert.c (__assert_fail): Likewise.
	* atexit.c (atexit): Likewise.
	* qsort.c (qsort): Likewise.
	* strtod.c: LIkewise.
	* termcap.c (tgetent, t_tentcp, t_tgetln): Likewise.
	(t_tgetid, tgetstr, tgoto): Likewise.

	* strsignal.c (strsignal): Simplify.

Sun Jan  5 12:37:50 2003  Alex Waugh  <alex@alexwaugh.com>

	* errno.h: Always define 'errno' as errno.
	* errno.c: Remove conditional.
	* pthread/context.c (__pthread_context_switch): Preserve errno.

	* pthread.h (__pthread_saved_context): Add spsr.
	* pthread/_context.s: Store/restore the SPSR.

	* sys/_alloca.s: Various APCS-32 fixes.
	* sys/_syslib.s: Likewise.

	* sys/errlist.c: Include pthread.h.

Sun Jan  5 12:29:13 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/exec.c (execve): Change control characters to \xXX.
	Don't backslash already quoted characters.
	* unix/unix.c (__hexstrtochar): New function.

Sat Jan  4 15:27:54 2003  Nick Burrett  <nick@dsvr.net>

	* sys/_syslib.s: Revert last change.  The SCL doesn't preserve ip
	either, so the fix should be applied to GCC.

Mon Dec 30 12:05:21 2002  Nick Burrett  <nick@dsvr.net>

	* sys/_syslib.s (__rt_stkovf_split_small): Preserve 'ip'.
	(__rt_stkovf_split_big): Likewise.
	(stack_overflow_common): Restore 'ip'.

Sun Dec 22 18:21:18 2002  John Tytgat  <John.Tytgat@aaug.net>

	* MKDir: added resolv & resolv.o
	* objs/Makefile,fe1: Added resolv/*; Removed netlib.o.ntohl,
	  netlib.o.ntohs, netlib.o.inet_addr, netlib.o.inet_aton, unix.o.syslog
	  Renamed netlib.o.htonl to netlib.o._bswap_32, netlib.o.htons to
	  netlib.o._bswap_16; Added string.o.rawmemchar, string.o.strchrnul,
	  string.o.strndup, string.o.strnlen, string.o.swab, netlib.o.in6_addr.
	* source/Makefile: Likewise.
	* Makefile: added resolv

	* arpa/inet.h: Replaced by version in glibc 2.2.5
	* arpa/nameser.h: Replaced by version in glibc 2.2.5
	* arpa/nameser_compat.h: Added (glibc 2.2.5)
	* arpa/tftp.h: Added (glibc 2.2.5)

	* bits/in.h: Added (glibc 2.2.5)
	* bits/netdb.h: Added (glibc 2.2.5)
	* bits/sockaddr: Added (glibc 2.2.5)
	* bits/socket.h: Added (glibc 2.2.5)

	* byteswap.h: Added (glibc 2.2.5)
	* dirent.h: Changed __u_int32_t into __uint32_t
	* net/if.h: Replaced by version in glibc 2.2.5
	* netdb.h: Replaced by version in glibc 2.2.5
	* netinet/{in.h,in_systm.h,ip.h,ip_icmp.h,tcp.h,udp.h}:
	  Replaced by version in glibc 2.2.5
	* netinet/ip_var.h: Changed #include <sys/bytesorder.h> into
	  #include <netinet/in.h>.
	* resolv.h: Added (glibc 2.2.5)
	* resolv/resolv.h: Added (glibc 2.2.5)
	* stdio-common/stdio_ext.h: Added (glibc 2.2.5)
	* stdio_ext.h: Added (glibc 2.2.5)
	* stdint.h: When __int8_t_defined is defined, this does not
	  mean that uint8_t, uint16_t, uint32_t and uint64_t are defined (but
	  u_int8_t, u_int16_t, u_int32_t adn u_int64_t are defined).
	* string.h: Added GNU calls __rawmemchr(), strndup(),
	  strnlen() & strchrnul(); When __USE_BSD is defined, declare bcopy(),
	  bzero(), bcmp(), index(), rindex(), strcasecmp() and strncasecmp().
	* strings.h: Function calls are BSD functions calls so
	  wrapped them inside an #ifdef __USE_BSD.
	* string/byteswap.h: Added (glibc 2.2.5)
	* sys/bitypes.h: Added (glibc 2.2.5)
	* sys/byteorder.h: Removed (as htonl(), ntohl(), htons()
	  and ntohs() are defined in netinet/in.h).
	* sys/netdb.h: Removed (as the SWI veneers are now defined
	  in bits/netdb.h)
	* sys/sysmacros.h: Added (glibc 2.2.5)
	* sys/uio.h: Changed #include <unixlib/types.h> into
	  #include <sys/types.h> so that return types of readv() and writev()
	  are a defined ssize_t (was previously the internal type __ssize_t).
	* swis.h: Added Internet 5 new SWIs.
	* unixlib/asm_dec.s: Added COMPAT_INET4 (default off),
	  added Internet 5 new SWIs.
	* unixlib/features.h: Added more #define's for Norcroft C
	  compiler; Removed all sections which are also defined in
	  misc/sys/cdefs.h;
	  Defined BSD; Added #undef COMPAT_INET4
	* unixlib/math.h: Changed __u_int32_t into __uint32_t
	* unixlib/types.h: Replaced by version in glibc 2.2.5
	* sys/cdefs.h: Added (glibc 2.2.5)
	* sys/select.h: 5th param pselect() is 'const struct
	  timespec *', not 'struct timespec'.  Was also missing 6th param
	  'const __sigset *'.
	* math/acosh.c: Changed __u_int32_t into __uint32_t.
	* math/atanh.c: Likewise.
	* math/cbrt.c: Likewise.
	* math/erf.c: Likewise.
	* math/exprm1.c: Likewise.
	* math/fmod.c: Likewise.
	* math/fpclassify.c: Likewise.
	* math/jn.c: Likewise.
	* math/llrint.c: Likewise.
	* math/llround.c: Likewise.
	* math/log2.c: Likewise.
	* math/lrint.c: Likewise.
	* math/lround.c: Likewise.
	* math/modf.c: Likewise.
	* math/nearbyint.c: Likewise.
	* math/nextafter.c: Likewise.
	* math/remainder.c: Likewise.
	* math/remquo.c: Likewise.
	* math/rem_pio2.c: Likewise.
	* math/rint.c: Likewise.
	* math/round.c: Likewise.
	* math/trunc.c: Likewise.
	* misc/sys/cdefs.h: Added (glibc 2.2.5)
	* misc/sys/socket.h: Replaced by version in glibc 2.2.5
	* misc/sys/types.h: Replaced by version in glibc 2.2.5
	* netlib/accept.c: Type of last parameter of accept() is
	  socklen_t *, not int *.
	* netlib/bind.c: Type of last parameter of bind() is socklen_t,
	  not int. Removed commented out debug line.
	* netlib/connect.c: Type of last parameter of connect() is
	  socklen_t, not int. Removed commented out debug line.
	* netlib/getpeernam.c: Type of last parameter of getpeernam()
	  is socklen_t *, not int *.
	* netlib/getsocknam.c: Type of last parameter of getsocknam()
	  is socklen_t *, not int *.
	* netlib/getsockopt.c: Type of last parameter of getsockopt()
	  is socklen_t *, not int *.
	* netlib/host.c: Return types of sethostent() end endhostent()
	  are void, not int; First 2 parameters of gethostbyaddr() are const
	  void * and socklen_t, not const char * and int.
	* netlib/in6_addr.c: Added (glibc 2.2.5)
	* netlib/inet_addr.c: Removed (new code at resolv/inet_addr.c)
	* netlib/inet_aton.c: Likewise.
	* netlib/inet_lnaof.c: Return type of inet_lnaof() is in_addr_t,
	  not u_long.
	* netlib/inet_netof.c: Return type of inet_netof() is in_addr_t,
	  not u_long.
	* netlib/inet_netwo.c: Removed #include <sys/byteorder.h>;
	  Return type of inet_network() is in_addr_t, not u_long.
	* netlib/inet_mkad.c: Both parameters of inet_makeaddr() are
	  in_addr_t, not u_long.
	* netlib/net.c: Return type of setnetent() and endnetent() is
	  void, not int.  First parameter of getnetbyaddr() is uint32_t, not
	  long.
	* netlib/ntohl.s (ntohl): Removed (is implemented as
	   __bswap_32())
	* netlib/ntohs.s (ntohs): Removed (is implemented as
	   __bswap_16())
	* netlib/ntop.c: Removed #include <sys/byteorder.h>
	* netlib/proto.c: Return type of setprotoent() and endprotoent()
	  is void, not int.
	* netlib/pton.c: Removed #include <sys/byteorder.h>
	* netlib/recv.c (recv): Third parameter of recv() is
	  size_t (unsigned int), not int.
	* netlib/recvfrom.c (recvfrom): Type of third and last parameter
	  of recvfrom() is size_t and socklen_t (unsigned int) respectively,
	  not int and int.
	* netlib/send.c (send): Type of third parameter of send() is
	  size_t, not int.
	* netlib/sendto.c (sendto): Type of third and last parameter of
	  sendto() is size_t and socklen_t (unsigned int) respectively, not int
	  and int.
	* netlib/serv.c: Removed #include <sys/byteorder.h>; Return type
	  of the setservent() and endservent() routines is void, not int.
	* netlib/setsockopt.c (setsockopt): Last parameter of
	  setsockopt() is socklen_t (unsigned int), not int.
	* netlib/socket.c: Changed #include <sys/netdb.h> into #include
	  <netdb.h>
	* netlib/_accept.s: Added check for COMPAT_INET4.
	* netlib/_recvfrom.s: Likewise.
	* netlib/_recvmsg.s: Likewise.
	* netlib/_sendmsg.s: Likewise.
	* netlib/_getpeername.s: Likewise.
	* netlib/_getsockname.s: Likewise.
	* netlib/_bswap_32.s (__bswap_32): Added (was the htonl.s
	  implementation)
	* netlib/_bswap_16.s (__bswap_16): Added (was the htons.s
	  implementation)
	* opensock.c: Added (glibc 2.2.5)
	* string/strchrnul.c: Added (glibc 2.2.5)
	* string/strndup.c: Added (glibc 2.2.5)
	* string/swab.c: Added (glibc 2.2.5)
	* strsignal.c (strsignal): Changed return type to 'char *'.
	* unix/dev.c: Changed #include <sys/netdb.h> into #include
	  <netdb.h>
	* unix/fcntl.c: Likewise.
	* unix/pselect.c (pselect): Parameters were wrong.  Based
	  implementation on glibc 2.2.5.

Sun Dec 15 13:35:02 2002  Alex Waugh  <alex.waugh@arm.com>

	* common/riscosify.c: Re-write.

Sun Dec 15 13:15:39 2002  Alex Waugh  <alex.waugh@arm.com>

	POSIX threads and Stack Chunk implementation.

Fri Dec 13 11:07:21 2002  Nick Burrett  <nick@dsvr.net>

	* time.h (localtime_r): Declare.
	(gmtime_r): Declare.
	(__calendar_convert): Fixup prototype.
	* calendconv.c (__calendar_convert): Make re-entrant.
	* gmtime.c (gmtime): Fixup call to support new re-entrant version
	of `__calendar_convert'.
	* localtime.c (localtime): Likewise.
	* localtime_r.c: New file.
	* gmtime_r.c: New file.

	* errno.h (__set_errno): Add __UNIXLIB_INTERNALS guard.  This macro
	shouldn't be exposed outside of UnixLib.

Wed Nov 27 19:00:00 2002  Nick Burrett  <nick@dsvr.net>

	64-bit placeholders
	* unixlib/types.h (__off64_t): Declare.
	(__fpos64_t): Declare.
	* sys/types.h: Define __off64_t, if not defined.
	* sys/stat.h (stat64): Define as 'stat'.

Tue Nov 26 21:46:52 2002  Nick Burrett  <nick@dsvr.net>

	C99 dialect functions.
	* stdlib/strtof.c: New file.
	* stdlib/strtold.c: New file.

	32-bit float type C99 dialect math functions.
	* math/fmodf.c: New file.
	* math/frexpf.c: New file.
	* math/modff.c: New file.
	* math/_asinf.s: New file.
	* math/_acosf.s: New file.
	* math/_atan2f.s: New file.
	* math/_atanf.s: New file.
	* math/_ceilf.s: New file.
	* math/_cosf.s: New file.
	* math/_coshf.s: New file.
	* math/_expf.s: New file.
	* math/_floorf.s: New file.
	* math/_ldexpf.s: New file.
	* math/_log10f.s: New file.
	* math/_logf.s: New file.
	* math/_modf1f.s: New file.
	* math/_powf.s: New file.
	* math/_sinf.s: New file.
	* math/_sinhf.s: New file.
	* math/_tanf.s: New file.
	* math/_tanhf.s: New file.

	* math/fmod.c: Suport long double float type C99 math functions.
	* math/frexp.c: Likewise.
	* math/modf.c: Likewise.
	* math/_asin.s: Likewise.
	* math/_acos.s: Likewise.
	* math/_atan2.s: Likewise.
	* math/_atan.s: Likewise.
	* math/_ceil.s: Likewise.
	* math/_cos.s: Likewise.
	* math/_cosh.s: Likewise.
	* math/_exp.s: Likewise.
	* math/_floor.s: Likewise.
	* math/_ldexp.s: Likewise.
	* math/_log10.s: Likewise.
	* math/_log.s: Likewise.
	* math/_modf1.s: Likewise.
	* math/_pow.s: Likewise.
	* math/_sin.s: Likewise.
	* math/_sinh.s: Likewise.
	* math/_tan.s: Likewise.
	* math/_tanh.s: Likewise.

	* math.h: Create prototypes for `float' and `long double' functions.

	* strtol.c (atol): Remove explicit casts.
	* strtoll.c (atoll): New function.

	* unix/unix.c (_Exit): New function.
	(exit): Split into _Exit.  Call atexit functions here, then
	call _Exit to perform the final termination code.

	* stdlib.h (_Exit): New prototype.
	(atoll): New prototype.
	(strtof): New prototype.
	(strtold): New prototype.

Wed Nov 13 11:58:00 2002  Peter Naulls  <peter@chocky.org>

	* sys/socket.h (bind): Correct prototype.
	(accept, connect, recvfrom, getsockname, getpeername): Likewise.
	(_bind, _accept, _connect, _recvfrom, _getsockname): Likewise.
	(_getpeername): Likewise.
	* netlib/accept.c: Likewise.
	* netlib/bind.c: Likewise.
	* netlib/connect.c: Likewise.
	* netlib/getsocknam.c: Likewise.
	* netlib/getsockopt.c: Likewise.
	* netlib/recvfrom.c: Likewise.
	* netlib/setsockopt.c: Likewise.

	* stdio/popen.c (pclose): Correct type usage.
	* sys/execl.c (execl): Likewise.

	* unix/dev.c (__piperead): Fix pipe code to actually work.
	(__pipewrite): Don't seek on pipes.
	(__pipeselect): Likewise.
	* unix/pipe.c (pipe): Put temporary pipe files into /tmp/pipe.

	* unix/select.c (select): Fix broken comparison.

	* unix/tty.c (__tty_console_gwinsz): Change variable naming
	to better suit terminal handling.

Wed Nov 13 10:55:36 2002  Stefan Bellon  <sbellon@sbellon.de>

	* stdint.h: Norcroft version 5.50 supports long long.

	* stdio/_printf.s (_vprintf, _snprintf): New functions.
	(_vsprintf, _vsnprintf): New Norcroft compatibility functions.

Mon Oct 21 22:12:25 2002  Alex Waugh  <alex.waugh@arm.com>

	* sys/exec.c (execve): Allow a null argument list.

	* stdio/printf.c (vfprintfsub): When the buffer isn't large enough,
	return the number of characters that would be written had the
	buffer been big enough.

Mon Oct 21 21:53:21 2002  Peter Naulls  <peter@chocky.org>

	* sys/_syslib.s (__main): Move ENTRY after NAME.
	* common/riscosify.c (__riscosify): Don't default to filetype text
	if there is an error.

Sat Sep 28 16:00:00 2002  Peter Naulls  <peter@chocky.org>

	* unix/unix.c (convert_command_line): Fix argument could error
	when faced with arguments like "2> stderr".

Tue Sep 24 14:32:56 2002  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): Make 2nd and 3rd param char *const [].
	* sys/execv.c (execv): Make 2nd param char *const [].
	* sys/execvp.c (execvp): Likewise.
	* unistd.h (execv, execve, execvp): Fix prototypes accordingly.

Tue Sep 24 13:08:36 2002  Nick Burrett  <nick@dsvr.net>

	* strsignal.c (strsignal): Return a char *, not const char *.
	* string.h (strsignal): Fix prototype.

Tue Sep 24 13:03:52 2002  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): Make 3rd param char *const *.
	* sys/execv.c (execv): Make 2nd param char *const *.
	* unistd.h (execv, execve): Fix prototypes accordingly.

Tue Sep 24 13:00:22 2002  Nick Burrett  <nick@dsvr.net>

	* unix/proc.c (setegid): Set errno to EPERM on failure.

Tue Sep 24 12:50:37 2002  John Tytgat  <John.Tytgat@aaug.net>

	* strsignal.c (strsignal): strsignal(NSIG) wasn't detected
	as an error.
	* signal.h (sys_siglist): const'ify
	* signal/signame.c (sys_siglist):  Likewise.
	* signal/_signal.s (__h_error): Using the NAME macro.
	* sys/_alloca.s (alloca): Added some comments how this
	works; Added APCS-32 compatibility.
	* sys/_sigjmp.s (sigsetjmp): No need to save a2 & ip.

Tue Sep 24 12:28:40 2002  Peter Naulls  <peter@chocky.org>

	* netinet/in.h (struct ip_opts): Rename ip_opts to Ip_opts to
	workaround C++ incompatibility.

	* alloc.c (mmap_chunk): Fix alignment warning.
	* strcmp.c (strcmp): Retain type consistency.
	* netdb.h (gethostbyname2): Add prototype.
	* common/riscosify.c (__riscosify): Fix signed/unsigned comparison.
	* math/expm1.c (expm1): Fix warnings about uninitialised variables.
	* stdio/scanf.c (vfscanf): Fix function type usage.
	* stdio/tmpfile.c (generate_temporary_filename): Fix type consistency.
	* sys/exec.c (execve): Avoid alignment warning.

Mon Aug 19 12:50:40 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: module 'string' dependency was wrong; Made
	Norcroft C compiler selection the default.
	* unistd.h: Added missing #endif to fix 18-Aug-2002 19:32:36 change.

Sun Aug 18 22:19:01 2002  John Tytgat  <John.Tytgat@aaug.net>

	crypt implementation -- derived from glibc 2.2.5.
	* MKDir: Creating crypt & crypt.o directories.
	* objs/Makefile,fe1: Added crypt/*; Removed o.fcrypt.
	* source/Makefile: Likewise.
	* fcrypt.h: Replaced by a #include <crypt.h>.
	* stdint.h: Added long long equivalents for Norcroft C.
	* unixlib/features.h: Added __const, __THROW definitions
	for Norcroft C.
	* fcrypt.c: Remove
	* crypt.h: New file (from glibc 2.2.5)
	* crypt/crypt.c: New file.
	* crypt/crypt-entry.c: New file.
	* crypt/crypt_util.c: New file.
	* crypt/crypt-private.h: New file.
	* crypt/ufc-crypt.h: New file.
	* crypt/md5.c: New file.
	* crypt/md5-crypt.c: New file.
	* crypt/md5.h: New file.

Sun Aug 18 20:54:03 2002  John Tytgat  <John.Tytgat@aaug.net>
			  Nick Burrett  <nick@dsvr.net>

	Implement __riscosify_control as a WEAK variable.
	* common/_riscosify.s: New file.
	* unixlib/local.h (__get_riscosify_control): Add prototype.
	* common/riscosify.c (__riscosify_std): Use `__get_riscosify_control'
	rather than `__riscosify_control'.
	* common/unixify.c (__unixify_std): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	* unix/dirent.c (opendir): Likewise.
	(readdir_r): Likewise.
	(rewinddir): Likewise.

Sun Aug 18 19:32:36 2002  Nick Burrett  <nick@dsvr.net>

	* string/swab.c: New file.
	* unistd.h (swab): Add prototype.

Sun Aug 18 16:15:25 2002  Nick Burrett  <nick@dsvr.net>

	[ BUG 51 ]
	* All header files: Include <unixlib/features.h>.  Use __BEGIN_DECLS
	and __END_DECLS for the extern "C" decls.
	* unix/tty.c (_BSD_SOURCE): Declare.

Sat Aug 17 13:58:36 2002  Nick Burrett  <nick@dsvr.net>

	* unix/fstat.c (fstat): Fix bad cast.

Sat Aug 17 12:02:23 2002  Nick Burrett  <nick@dsvr.net>

	* netlib/h_errno.c (h_errno): Change type to int. Include netdb.h.

Sat Aug 17 11:59:58 2002  Nick Burrett  <nick@dsvr.net>

	* netdb.h (h_errno): Declare.

Sat Aug 17 11:58:29 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/fstat.c (fstat): Return true extent, rather than file
	allocation size.

Sat Aug 17 11:51:39 2002  Peter Naulls  <peter@chocky.org>

	* unixlib/local.h (__RISCOSIFY_FILETYPE_SET): New macro.
	(__RISCOSIFY_MASK): Alter accordingly.
	* common/riscosify.c (__riscosify): Use the MimeMap module
	to match the filename extension and set the filetype appropriately.
	* unix/features.c (__runtime_features): Set riscosify default
	to setting the filetype.
	* unixlib/swiparams.h (MMM_TYPE_RISCOS): Define.
	(MMM_TYPE_RISCOS_STRING): Define.
	(MMM_TYPE_MIME): Define.
	(MMM_TYPE_DOT_EXTN): Define.
	* swis.h (MimeMap_Translate): Define.

Mon Aug  5 10:15:40 2002  Peter Naulls  <peter@chocky.org>

	* netlib/_net_error.s (__net_error_simple_entry): Add branch
	to jump over recent NAME entry.

	* netlib/connect.c (connect): Update debugging code.

Mon Aug  5 10:09:40 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (verify_redirection): A space is not permitted between
	a file descriptor number and a redirection operator.

Mon Aug  5 10:07:11 2002  Peter Naulls  <peter@chocky.org>

	* pwd/pwdread.c (__pwddefault): Fix logic inversion of pwd_inited
	comparison.

	* unix/fcntl.c (fcntl): Third argument to _sioctl is an address to
	an argument.

Wed Jul 31 15:16:14 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (check_io_redir): Cope with [fd]>>.
	(get_io_redir): Likewise.

Fri Jul 26 13:32:38 2002  Nick Burrett  <nick@dsvr.net>

	* stdint.h: Add missing #endif
	* net/if.h: Set __NET_IF_H rather than __SYS_IF_H.

Fri Jul 26 11:00:15 2002  Nick Burrett  <nick@dsvr.net>

	* stdio/fpos.c (fseek): Set errno to EINVAL if the offset to
	SEEK_SET is negative, but don't set the stream error.

Fri Jul 26 10:47:36 2002  Nick Burrett  <nick@dsvr.net>

	* sys/_vfork.s (vfork): No need to save sp around __vfork call.
	I think it is legacy from the old __vfork implementation.

Fri Jul 26 10:41:47 2002  Peter Naulls  <peter@chocky.org>
			  Nick Burrett  <nick@dsvr.net>

	* common/stat.c (__stat): If ImageFS is to be treated as a
	directory, then fudge directory size and set hard links to 2.
	Otherwise don't fudge directory size and set hard links to 1.

Fri Jul 26 10:35:30 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/fcntl.c (fcntl): When F_SETFL is called on a socket,
	actually alter the behaviour of the socket.

Fri Jul 19 14:19:48 2002  John Tytgat  <John.Tytgat@aaug.net>

	* index.c: #include <strings.h> so that we have header file
	declaration all exported functions.

Fri Jul 19 14:18:33 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Fixed typo in the Norcroft compiler settings

Fri Jul 19 14:16:30 2002  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/_rand48.c, drand48.c, erand48.c, jrand48.c, lcong48.c
          lrand48.c, mrand48.c, nrand48.c, random.c, seed48.c
          srand48.c: Added RCS style comment header
	* sys/vfork.c (__vfork): The last environment and argument
	  vector needs to be NULL.

Fri Jul 19 14:13:45 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Removed o.rand
	* scl/_kernel.s: declared AREA readonly. Updated comments.
	* common/_exist.s: Embedding function names
	* gcccompat/_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s:
	  Likewise.
	* math-asm/_acos.s, _asin.s, _atan.s, _atan2.s, _ceil.s
	  _copysign.s, _cos.s, _cosh.s, _exp.s, _fabs.s, _fclrexcpt.s
	  _fegetenv.s, _fegetrnd.s, _feholdexc.s, _fesetenv.s, _fesetroun.s
	  _finite.s, _floor.s, _fraiseexc.s, _fsetexcpt.s, _ftstexcpt.s
	  _hypot.s, _isinf.s, _isnan.s, _ldexp.s, _log.s, _log10.s, _modf1.s
	  _pow.s, _signbit.s, _sin.s, _sincos.s, _sinh.s, _sqrt.s, _tan.s
	  _tanh.s: Likewise.
	* netlib/_accept.s, _bind.s, _connect.s, _getpeerna.s
	  _getsockna.s, _getsockop.s, _gettsize.s, _hostbyadd.s, _hostbynam.s
	  _listen.s, _net_error.s, _readv.s, _recv.s, _recvfrom.s, _recvmsg.s
	  _sclose.s, _select.s, _send.s, _sendmsg.s, _sendto.s, _sendtosm.s
	  _setsockop.s, _shutdown.s, _sioctl.s, _socket.s, _sockstat.s
	  _sread.s, _swrite.s, _writev.s, htonl.s, htons.s, ntohl.s
	  ntohs.s: Likewise.
	* scl/_kcurskch.s, _kernel.s, _kgetenv.s, _kosargs.s
	  _kosbget.s, _kosbput.s, _kosbyte.s, _koscli.s, _kosfile.s
	  _kosfind.s, _kosgbpb.s, _kosrdch.s, _kosword.s, _koswrch.s
	  _ksetenv.s, _kswi_c.s: Likewise.
	* signal/_coredump.s, _signal.s, sigexec.s, printf.s:
	  Likewise.
	* sys/_alloca.s, _divsi3.s, _divtest.s, _jmp.s, _mem.s
	  _mman.s, _modsi3.s, _os.s, _profile.s, _sdiv.s, _sdiv10.s
	  _sigjmp.s, _smod.s, _swi.s, _syslib.s, _udiv.s, _udiv10.s
	  _udivsi3.s, _umod.s, _umodsi3.s, _vfork.s: Likewise.
	* time/_clock.s: Likewise.
	* unix/getpagesiz.s: Likewise.

Sat Jun 15 13:56:57 2002  Nick Burrett  <nick@dsvr.net>

	* stat/mknod.c: New file.
	* stat/mkfifo.c: New file.
	* sys/stat.h (mknod). Add prototype.
	(mkfifo): Add prototype.

	* unistd/chown.c: Move here from directory unix to reduce number of
	files in the directory.
	* unistd/fchown.c: Likewise.
	* unistd/link.c: Likewise.
	* unistd/readlink.c: New file. Function split from link.c
	* unistd/symlink.c: Likewise.

Wed Jun 12 15:34:06 2002  Nick Burrett  <nick@dsvr.net>

	* stdlib/rand.c (srand): Call rand, not lrand.

	* stricmp.c: Include strings.h.
	* strnicmp.c: Include strings.h.

Wed Jun 12 14:34:13 2002  Nick Burrett  <nick@dsvr.net>

	* stdlib/drand48.c: New file.
	* stdlib/erand48.c: New file.
	* stdlib/jrand48.c: New file.
	* stdlib/lcong48.c: New file.
	* stdlib/lrand48.c: New file.
	* stdlib/mrand48.c: New file.
	* stdlib/nrand48.c: New file.
	* stdlib/_rand48.c: New file.
	* stdlib/rand48.h: New file.
	* stdlib/seed48.c: New file.
	* stdlib/srand48.c: New file.

	* stdlib/rand.c: Moved here from parent directory.  Stripped out
	the rand48 functions and random and srandom.

	* stdlib/random.c: New file.  A better random number generator.

	* stdlib.h (lrand48, rand, random, srandom): Remove macroised
	versions of these functions since they are now properly implemented.
	(initstate): Declare.
	(setstate): Declare.
	(drand48): Declare.
	(erand48): Declare.
	(lrand48): Declare.
	(nrand48): Declare.
	(mrand48): Declare.
	(jrand48): Declare.
	(srand48): Declare.
	(seed48): Declare.
	(lcong48): Declare.

	* sys/mman.h (MAP_FAILED): Add macro.

Wed Jun 12 12:13:20 2002  Peter Naulls  <peter@chocky.org>

	* Sprites,ff9, Sprites22,ff9: Rename from !unixlib37 to !unixlib.

Mon Jun 10 19:14:37 2002  Stefan Bellon  <sbellon@sbellon.de>

	* unix/dev.c (__fsopen): Fix ImageFS logic inversion.

Mon Jun 10 19:08:39 2002  Peter Naulls  <peter@chocky.org>

	* locale.h (LC_MESSAGES): Define.
	* locale/localeconv.c (localeconv): Use malloc'ed strings rather
	than statics.
	* locale/setlocale.c (locale_names): Add LC_MESSAGES.

Mon Jun 10 17:31:46 2002  Nick Burrett  <nick@dsvr.net>

	* common/stat.c (__feature_imagefs_is_file): Remove extern decl.
	* unix/dev.c: Likewise.
	* unixlib/features.h (__feature_imagefs_is_file): Declare here.

Mon Jun 10 13:08:23 2002  Stefan Bellon  <sbellon@sbellon.de>

	* unix/dev.c (__fsopen): Support PipeFS.

Mon Jun 10 13:01:48 2002  Nick Burrett  <nick@dsvr.net>
			  Stefan Bellon  <sbellon@sbellon.de>

	* unix/features.c (__feature_imagefs_is_file): Declare.
	(__runtime_features): Set default to handling Image filesystems
	as directories.
	* unix/stat.c (__stat): Allow image filesystems to be treated
	as a file.
	* unix/dev.c (__fsopen): Likewise.

Mon Jun 10 12:43:11 2002  Peter Naulls  <peter@chocky.org>
			  John Tytgat  <John.Tytgat@aaug.net>

	* pwd.h (__pwddefault): Declare.
	* getpwnam.c (getpwnam): If passwd file cannot be found,
	then use __pwddefault to supply fake entries.
	* getpwnam_r.c (getpwnam_r): Likewise.
	* getpwuid.c (getpwuid): Likewise.
	* getpwuid_r.c (getpwuid_r): Likewise.
	* pwdread.c (__pwddefault): New function.

Mon Jun 10 12:32:13 2002  John Tytgat  <John.Tytgat@aaug.net>

	* math/exp.c: Include stdlib.h.
	* unix/unix.c (__badr): Delete macro.
	(__unixlib_fatal): Delete macro.

Mon Jun 10 11:01:17 2002  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (_main): Make a snapshot of `environ' as calls
	to getenv can change its value, which is considered invalid.

Mon Jun 10 10:56:10 2002  Maarten Bezemer  <veger2002@hotmail.com>

	* stdio/tmpfile.c (tempnam): A logic error prevents `dir' being
	used as a suitable temporary directory.

Thu Apr 18 08:39:08 2002  Alex Waugh  <alex@alexwaugh.com>

	* stdio/printf.c (vsnprintf): Honour the length parameter even
	if it is zero.

Thu Apr 18 08:32:42 2002  John Tytgat  <John.Tytgat@aaug.net>

	* clib/stddef.h: Better protection against multiple includes
	avoiding the "repeated definition of #define macro xxx" warning
	from the Norcroft compiler.  Simplified source a bit.
	* clib/time.h: Likewise.
	* sys/time.h: Likewise.
	* sys/uio.h: Removed the unnecessary #include <stdarg.h> and
	#define __need_size_t.

Wed Apr 03 09:41:27 2002  Nick Burrett  <nick@dsvr.net>

	* netlib/host.c (gethostbyname2): New function.  Move the
	main work of gethostbyname into here.
	(gethostbyname): This is implmented in terms of gethostbyname2.

Wed Apr 03 08:45:18 2002  Peter Naulls  <peter@chocky.org>

	* memcmp.c (memcmp): Fix compiler warnings.
	* sys/debug.c (__debugval): Likewise.
	* strncmp.c (strncmp): Likewise.
	* errno.h (sys_errlist): Constify.
	* signal.h (sys_siglist): Constify.
	* stdio.h (sys_errlist): Constify.
	* time.h (tm_zone): Constify.
	* signal/signame.c (sys_siglist): Constify.
	* sys/errlist.c (sys_errlist): Constify.
	* uname.c (__uname): Return pointer to empty buffer in read/write
	space.

Tue Apr 02 20:01:07 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (verify_redirection): Add logic to cope with
	file descriptor numbers before redirection operators.
	(find_redirection_type): Add logic to recognise file descriptor
	before redirection operators so as to prevent false arguments.

Mon Apr 01 11:27:23 2002  Peter Naulls  <peter@chocky.org>

	* ctype.h (isprint): Fix logic error.

Sat Mar 30 10:09:52 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/tty.c (__ttyicanon): Don't set error if EOF is encountered.

Sat Mar 30 10:00:52 2002  Alex Waugh  <alex@alexwaugh.com>

	* sys/_jmp.s: Fix APCS-32 typo.

Sat Mar 30 10:00:52 2002  John Tytgat  <John.Tytgat@aaug.net>

	* unistd.h (ualarm): Declare.
	(usleep): return type is now 'int'.
	* signal/sleep.c: Added GNU LGPL.
	(sleep_int): Created, this gets	used by `sleep' and `usleep'.
	`usleep' works now with a 1/100th sec resolution instead of 1 sec.
	* sys/alarm.c: Added GNU LGPL.
	(alarm): Synced implementation with GNU C Lib.
	(ualarm): Added.
	* time/setitmr.c (setitimer): Changed invalid parameter test

	* unixlib/features.h: Clean up Norcroft compiler warnings.

Sat Mar 30 09:37:00 2002  Theo Markettos  <theo@markettos.org.uk>

	* unistd/chroot.c: New file.  Stub function.
	* unistd/getpass.c: New file.
	* unistd.h (chroot): Declare.
	(getpass): Declare.

Mon Feb 11 13:15:03 2002  Alex Waugh  <alex@alexwaugh.com>

	* strtol.c (strtol): Correctly detect when the string supplied
	contains a leading +, - or 0x but no actual number.
	* strtoll.c (strtoll): Likewise.
	* strtoul.c (strtoul): Likewise.
	* strtoull.c (strtoull): Likewise.

Mon Feb 11 13:10:28 2002  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/printf.c (vfprintfsub): Incorrect argument for `wcrtomb'.
	Added #include <strings.h> for bcopy() declaration.
	* sys/_syslib.s: Reshuffling of the AREAs otherwise AAsm complains.
	Added ALIGN after RMEnsure text.

Thu Feb  7 10:29:02 2002  Christian Ludlam  <chris@recoil.org>

	* unix/dirent.c (scandir): New function.
	* dirent.h (scandir): Fix prototype.

Thu Feb  7 10:17:01 2002  Peter Naulls  <peter@chocky.org>

	* alloc.c: Clean up compiler warnings.
	* netlib/host.c: Likewise.
	* stdarg.h: Likewise.
	* machine/nan.h (NAN): Likewise.

	* inttypes.h: Add __extension__ to GCC specific C extensions.
	* stdint.h: Likewise.
	* stdlib.h: Likewise.
	* wchar.h: Likewise.
	* unixlib/types.h: Likewise.

	* math.h (exp2, exp10, round, lround, llround, drem): Prototype.
	* machine/ieee754.h (__ieee754_exp): Prototype.

	* fcntl.h (O_NOCTTY): Define.
	* assert.h (assert): Remove __noreturn__.

Tue Jan 31 16:18:22 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* getopt.h: Don't include the GNU specific getopt long stuff.

Tue Jan 31 16:18:22 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* getopt.h: New file.
	* unistd.h: Include getopt.h rather than defining prototypes
	for getopt.

Tue Jan 31 14:31:05 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/tmpfile.c (generate_temporary_filename): Randomise
	filename based on program start time.  This should help to
	reduce application concurrency issues.

Tue Jan 31 14:31:05 2002  Peter Naulls  <peter@chocky.org>

	* unistd.h (symlink): Declare.
	(readlink): Declare.
	* unix/link.c (symlink): New function.
	(readlink): New function.
	* unix/glob.c (glob3): Fix warnings.
	* unix/open.c (ttyname): Return pointer to a static buffer.
	* unix/syslog.c (vsyslov): Call `write' rather than `writev'.
	* unix/unix.c (__unixinit): Fix warnings.
	(initialise_unix_io): Make tty const.

Tue Jan 15 13:20:42 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (_IOMAGIC): Change to 0xfe000000 in order to reduce
	the number of instructions required to check for a valid stream.
	* stdio/flsbuf.c (__flsbuf): Remove check on stream validity
	since all callers provide this.
	* stdio/putc.c (fputc): Implement old `putc' macro here to remove
	infinite loop caused by last change.

Sat Jan 12 16:31:01 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (putc): Do not define as a macro.  We should not
	be evaluating the argument more than once.

Sat Jan 12 16:15:07 2002  Alex Waugh  <alex@alexwaugh.com>

	* locale/ctypetable.c (__build_ctype_tables): Correctly
	initialise __ctype_lower and upper for C/POSIX locale.

	* unix/dev.c (__fsopen): When opening a file O_RDWR, return
	ENOENT when file does not exist.

Sat Jan 12 16:09:05 2002  Peter Naulls  <peter@chocky.org>

	* unix/fcntl.c (fcntl): Restrict flags that can be altered
	by F_SETFL.

Sat Jan 12 16:06:35 2002  Peter Naulls  <peter@chocky.org>

	* termios/tcsetattr.c (tcsetattr): Mask out hardware state.
	* unix/tty.c (__ttyicanon): Don't reset cursor position.

Sat Jan 12 15:46:08 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (putchar): Do not define as a macro.

Thu Dec 20 09:46:26 2001  David Marston  <david@illudium.org.uk>

	* module/sul.s (upcall_handler): Remove duplicate lines.

Wed Dec 19 16:52:09 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	Module workaround for UpCall related system lock-up.
	* unixlib/asm_dec.s: New SWI decls.
	* sys/_syslib.s (_main): Add SharedUnixLibrary initialisation
	code.
	(__exit): Add SharedUnixLibrary finialsation code.
	(handlers): We no longer install __h_upcall.
	* module/sul.s: New file.

Tue Dec 18 11:19:01 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/dev.c (__fsopen): Do not set O_CREAT if the files does
	not exist.

Thu Oct  4 13:50:05 2001  Alex Waugh  <alex@alexwaugh.com>

	* stdlib/realpath.c: New file.
	* stdlib.h (realpath): Declare.

Tue Oct 02 11:18:36 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* unixlib/asm_dec.s (EOPSYS): Change to 88 inline with errno.h.

Tue Oct 02 11:15:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_signal.s (__h_error): Call __unixlib_raise_signal
	rather than raise.

Fri Sep 21 17:12:15 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* complex.h (cacos): Fix typo that I made in last change by John..

Fri Sep 21 11:20:47 2001  John Tytgat  <John.Tytgat@aaug.net>

	* complex.h (cacos): Add missing underscore to _Complex.
	* unixlib/features.h: Add "#undef __attribute__" for
	Norcroft compatibility otherwise it complains about redefinition
	with different value.

Fri Sep 21 11:11:44 2001  John Tytgat  <John.Tytgat@aaug.net>

	* signal/_signal.s (__seterr): Wrote 4 bytes too far in
	__ul_errbuf_errblock so that next zero initialised variable got
	nuked.

Fri Sep 14 15:00:02 2001  Nick Burrett  <nick.burrett@btinternet.com>

	This is part one of a large header file cleanup.  The patch
	reduces the namespace pollution of including too many header
	files, by creating special __need_XXX macros for headers that
	only need certain definitions.  Multiple definitions are
	fixed by using special __XXX_defined macros.
	* complex.h, dirent.h, fcntl.h, fnmatch.h, glob.h: Changed.
	* grp.h, math.h, pwd.h, setjmp.h, stdarg.h, stddef.h: Changed.
	* stdint.h, stdio.h, stdlib.h, string.h, termios.h: Changed.
	* time.h, unistd.h, utime.h, wchar.h: Changed.
	* sys/poll.h, sys/resource.h, sys/select.h: Changed.
	* sys/socket.h, sys/stat.h, sys/syslog.h: Changed.
	* sys/time.h, sys/timeb.h, sys/types.h, sys/uio.h: Changed.
	* sys/utsname.h, sys/wait.h: Changed.
	* unixlib/dev.h, unixlib/local.h, unixlib/types.h: Changed.
	* unixlib/unix.h: Changed.

	* unixlib/tty.h: Renamed from sys/tty.h.
	* poll.h: New header file.
	* pthread.h: New header file.
	* syslog.h: New header file.

	* sys/exec.c (execve): Delete code in __TTY_STATIC_BUFS.
	(__exret): Likewise.
	* unix/tty.c (__ttyopen): Likewise.
	(__ttyclose): Likewise.
	(__ttyread): Likewise.
	(__ttyicannon): Likewise.
	(__ttywrite): Likewise.
	(__ttydel): Likewise.
	* unix/unix.c (create_process_structure): Likewise.

	* unix/alphasort.c (alphasort): Fix definition.
	* unix/poll.c (poll): Likewise.
	* unix/syslog.c (openlog): Likewise.
	* unix/pselect.c: Include time.h.
	* unix/select.c (select): Change __FD_SETSIZE to FD_SETSIZE.

	* unixlib/features.h: Added macros as a placeholder for part two
	of the header file cleanup.

	* strings.h (index, rindex): Moved here from string.h.
	(bcmp, bcopy, bzero, strcasecmp, strncasecmp): Likewise.
	* inttypes.h (imaxdiv_t): Define.

	* ctype.h (_toupper, _tolower): Declare.
	* div.c (lldiv): New function.
	* ctypeproc.c (_tolower): New function.
	(_toupper): New function.

Tue Sep 11 17:53:37 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* errno.h (EAGAIN): Renumber from 82 to 11 to bring inline
	with the Acorn Internet module.
	(EREFUSED): New Acorn Internet misspelling.
	(ENOSYS): Renumbered from 78 to 87.
	(ENOSR, ENOMSG, EBSDMSG, EIDRM, EDEADLK, ENOLCK, ENOMSG): Define.
	(ELIBVER, ELIBLIM, ELIBNOENT, ELIBNOEXEC): Define.
	* sys/errlist.c (sys_errlist): Fixup.

	* sys/ioctl.h (FIOSLEEPTW): Define.
	* termios/tcsetattr.c (tcsetattr): Use NOFLSH, ECHO, TOSTOP.
	* termios/tcgetattr.c (tcgetattr): Likewise.

Tue Sep 11 16:44:59 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* net/if.h: New file.  Renamed from sys/if.h.

Tue Sep 11 16:07:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* termios.h: Re-synced with FreeBSD 4.3.
	* sys/ioctl.h: Re-synced with FreeBSD 4.3.
	* unix/tty.c (ttydefchars): Change index 7 from _POSIX_VDISABLE
	to CERASE.
	(__ttyioctl): References into the c_cc array should use the
	V* macros rather than the C* macros.
	t_flushc gets its value from VDISCARD, not VFLUSH.
	t_brkc gets its value from VEOL, not CBRK.

Tue Sep 11 15:19:41 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/child.c: Delete file.
	* objs/Makefile (SYS): Remove sys.o.child.
	(sys.o.child): Delete dependency.

Tue Sep 11 15:15:37 2001  John Tytgat  <John.Tytgat@aaug.net>

	* unix/write.c: Include <unixlib/features.h> for the
	__FEATURE* #define's.
	* sys/exec.c: Likewise.
	* unix/tty.c: Likewise
	(__ttyioctl): Changed os_423break() into __os_423break().
	* sys/vfork.c: Likewise. And added explicit pid casting
	in __vfork().
	* time/setitmr.c (add_timer): Changed variable 'new' into 'newtime'
	to avoid C++ keyword warnings.
	* wchar/wcsdup.c: Likewise.
	* unistd.h: Moved the tcsetpgrp() declaration outside the
	#if 0'ed block.  Decl. of tcgetpgrp().
	* unixlib/unix.h: Decl. of __bsd_speeds[], __unixinit(), _main(),
	__exerr, __unixlib_signal_initialise(), __resource_initialise().
	Added #include <sys/types.h>, <kernel.h>.
	* termios/tcgetattr.c: #include unixlib/unix.h for
	__bsd_speeds[].
	* termios/tcsetattr.c: Likewise.
	* termios/tcsetattr.c (tcsetattr): Explicit char casting added.
	* stdio/printf.c: Made vfprintfsub() static.
	* signal/_signal.s: Added IMPORT |__unixlib_raise_signal| & raise.
	* unix/unix.c: Removed decl. of __unixlib_signal_initalise()
	& __resource_initialise().
	* objs/Makefile,fe1: (again) removed sys/syslib.c & sys/os.c.
	Moved Predefs to the top as it is independent of which
	compiler/linker is used.
	* termcap.c: Removed #include <sys/ioctl.h> as this avoids a
	problem in the Norcroft C compiler.  This header file will be
	loaded indirectly by including the other header files.
	* unixlib/local.h: Decl. of __sfixinit() & __sdirinit().
	* unix/features.c: Moved decl. of __sfixinit() & __sdirinit()

Tue Sep 11 14:57:01 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* objs/Makefile (GRP): User group files.

Tue Sep 11 14:40:33 2001  John Tytgat  <John.Tytgat@aaug.net>

	* unistd.h (usleep): New decl.
	* signal/sleep.c (usleep): New function.

Tue Sep 11 14:32:08 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* grp.h: New header file.
	* grp/fgetgrent.c: New file.
	* grp/fgetgrentr.c: New file.
	* grp/getgrent.c: New file.
	* grp/getgrgid.c: New file.
	* grp/getgrgid_r.c: New file.
	* grp/getgrnam.c: New file.
	* grp/getgrnam_r.c: New file.
	* grp/getgroups.c: New file.
	* grp/grpread.c: New file.

	* pwd/pwdread.c (__pwdread): Make local buffer static to
	avoid referencing problems.

Tue Sep 11 14:18:32 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/select.c (select): Use recommended setting of R1 for
	Taskwindow sleep.#
	* unix/tty.c (__ttyicanon): Yield in taskwindow to reduce
	CPU use.
	(__ttyiraw): Likewise.

Tue Sep 11 14:04:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* alloc.c (malloc_useable_size): Don't compile.  I don't think
	this is used on RISC OS.
	(malloc_update_mallinfo): Likewise.
	(malloc_stats): Likewise.
	(mALLOPt): Likewise.

	* signal/_coredump.s: Change AREA C$$data to C$$zidata.
	* sys/_alloca.s: Likewise.
	* sys/_vfork.s: Likewise.

	* sys/_sdiv.s: Rename C$code to C$$code.
	* scl/_memchk.s: Likewise.
	* sys/_udiv10.s: Likewise.
	* sys/_smod.s: Likewise.
	* sys/_umod.s: Likewise.
	* sys/_divtest.s: Likewise.
	* sys/_profile.s: Likewise.
	* sys/_sdiv10.s: Likewise.

	* time/setitmr.c (remove_ticker): Add inline attribute.
	(add_ticker): Likewise.

Tue Sep 11 13:55:54 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* sysexits.h: New header file.

Thu Sep  6 15:51:33 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* objs/Makefile,fe1 (SIGNAL): Remove o.setup and o.sigwakeup.
	* unixlib/sigstate.h (__unixlib_sig_init): Delete decl.
	(__unixlib_internal_post_signal): Delete decl.
	(__unixlib_setup_sighandler): Delete decl.
	(__h_sigill, __h_sigbus, __h_sigsegv0): Delete decl.
	(__h_sigfpe, __h_error, __h_sigint, __h_event): Delete decl.
	(__h_sigsys, __h_upcall, __h_sigalrm): Delete decl.
	(__h_sigvtalrm, __h_sigprof, __h_cback): Delete decl.
	(__h_exit, __cbreg, __h_errbuf, sigwakeup): Delete decl.
	* unixlib/unix.h (__runtime_features): Fix proto.
	* signal/_signal.s (__raise): Call __unixlib_raise_signal direct.
	(__h_error, __h_cback): Likewise.
	(callback_signal): Delete function.
	* signal/init.c (__unixlib_signal_initialise): Merge
	__unixlib_default_sigaction into here.
	* signal/post.c (__unixlib_default_sigaction): Delete funciton.
	(post_signal): Renaed from __unixlib_internal_post_signal.
	Make static.  Minor code cleanup.
	(sigsetup): New function.  This was __unixlib_setup_sighandler.
	* signal/setup.c: Delete file. Moved into post.c.
	* signal/sigwakeup.c: Delete file.  Nothing used it.
	* signal/signame.c (sys_siglist): Add comma after SIGTRAP [from
	Ian Jeffray].  Change message for SIGSYS to Unknown SWI.
	* signal/_syslib.s (__main): Don't change __stack_limit/__rwlimit
	after dynamic area setup [from Ian Jeffray].
	Fix inverse-logic bug when deleting UnixLib$env [from Ian Jeffray].

Wed Sep  5 17:32:19 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* unix/syslog.c (vsyslog): Bug fix.

Wed Sep  5 17:26:15 2001  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Added info on how to build APCS-R and
	APCS-32 versions. Fixed include path for objasm. Removed
	sys/syslib.c & sys/os.c.
	* clib/unixlib/asm_dec.s: Changed "{config}" into "{CONFIG}"
	(objasm knows only about the latter).
	* signal/sigexec.s: Likewise.
	* signal/_coredump.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_jmp.s (setjmp & __longjmp_l3): Changed test on "ARMFPE = "3""
	into "{CONFIG}=26" [This means either an APCS-R build, or either
	an APCS-32 build. No other flavours possible.]
	SFM/LFM post increase must be 48, not 12. When SFM/LFM gets
	executed, it shouldn't execute STFE/LDFE as well.
	* sys/_syslib.s: Added lots of IMPORT statements.

Tue Sep  4 17:31:42 2001  Nick Burrett  <nick.burrett@btinternet.com>

	Emphasise that these header files are private to UnixLib.
	* unixlib/dev.h: Renamed from sys/dev.h.
	* unixlib/os.h: Renamed from sys/os.h.  Change all functions to
	be prepended with a double-underscore.
	* unixlib/unix.h: Renamed from sys/unix.h.

	Fixup all source files for the above change.

Mon Sep  3 13:21:31 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/tty.c (__tty_console_gwinsz): If a WIMP program, then
	try to read terminal size from the ROWS and COLUMNS environment
	variables.
	(__ttyioctl): Turn TIOCLGET and TIOCLSET into dummy ioctls.
	Fix typo in TIOCSETP to allow setting of CBREAK.

Mon Sep  3 13:07:28 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/unix.c (check_io_redir): Print sensible error message
	upon I/O redirection failure.
	(convert_command_line): Null terminate command line.

Mon Sep  3 13:01:42 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/termios.h: New header.
	* sys/types.h: Include machine/endian.h.
	* unixlib/local.h: Fix RISC OS spelling typos.
	* !Help: Likewise.

Mon Sep  3 09:29:42 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/iocomm.h: Delete file -- duplicated by sys/ioctl.h.
	* sys/filio.h: Delete file -- duplicated by sys/ioctl.h.
	* sys/sockio.h: Delete file -- duplicated by sys/ioctl.h.

Sun Sep  2 15:03:26 2001  David Marston <david.marston@physics.org>

	* sys/_syslib.s (__main): Take into account __sigstk when
	checking for old dynamic area.

Sun Sep  2 11:25:00 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (vsnprintf): Add decl.
	(snprintf): Add decl.

Sun Sep  2 11:18:36 2001  Christian Ludlam <chris@recoil.org>

	* stdio/printf.c (out_char): New function.
	(out_write): New function.ls
	(WIDESTRING): Define.
	(WCHAR): Define.
	(STOP): Define.
	(vprintfsub): Renamed from vfprintf.  Support wide characters.
	(vfprintf): New function.
	(vsnprintf): New function.
	(snprintf): New function.

Sun Sep  2 11:07:47 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_syslib.s (__main): Let user specify their own name for
	the dynamic area.

Sat Sep  1 14:43:32 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_coredump.s (backtrace_remove_loop): Re-work restoring
	of RISC OS environment handlers.
	(backtrace_reinstall_loop): Likewise.
	(__c_environment_end): Delete.
	(AREA C$$data): Set NOINIT.
	* signal/_signal.s (__h_upcall): Fix to work in SVC mode [from
	Peter Naulls]
	(__seterr): Fix [from Peter Naulls].
	(__h_errbuf): Delete.  Change all uses to __ul_errbuf_errblock.
	(__h_error): Add some comments.
	(__h_sigint): No need to store tempories on stack.
	(__h_event): Likewise.
	(__ul_errbuf): Renamed from __ul_errbuf.pc -- makes errbuf
	the correct size [from Peter Naulls].
	* sys/_syslib.s (__read_environment_handler): Delete function.
	(__write_environment_handler): Delete function.
	(__env_riscos): New function. Replacement for
	__restore_calling_environment_handlers.
	(__env_read): New function.
	(__env_unixlib): New function.
	Set __ul_errbuf for the Error handler [from Peter Naulls].
	(handlers): New table.
	(__calling_environment): Define.
	* sys/syslib.c: Delete file.
	* sys/exec.c (execve): Inline call to __reset.
	(__exret): Call __env_read and __env_unixlib rather than
	__write_environment_handler.

	* sys/unix.h: Merge sys/syslib.h into here.
	(__unixinit): Delete decl.
	(__unixexit): Delete decl.
	(__find_free_child): Delete decl.
	* sys/syslib.h: Delete header file.
	* sys/_syslib.s (__main): Merge _main from sys/syslib.c into
	here.  Big code cleanup.  __himem was incorrectly set to __sigstksize.
	Reference variables relative to ip, to reduce use of LTORG.
	Incorporate the reading of UnixLib$env into here.
	Inline check_for_callaswi.
	(__svccli): Delete function.
	(check_for_callaswi): Delete function.
	(___stdioinit): Delete weak link.
	(___stdioexit): Likewise.
	(__u): Define.
	* unix/unix.c: Merge sys/syslib.c into here.
	(__atexit_function_array): New vector.
	(__atexit_function_count): New.
	(__unixinit): Initialise locale and stdio here.  Remove UnixLib$env
	checks.  If child process does not inherit an environment, then
	create a new one.
	(__unixexit): Delete function.
	(_main): New function.
	(exit): Moved here from sys/syslib.c.
	(_exit): Likewise.

	* bsearch.c: Include sys/unix.h rather than sys/syslib.h.
	* qsort.c, termcap.c: Likewise.
	* common/funcallerr.c: Likewise.
	* netlib/socket.c: Likewise.
	* resource/getrlimit.c, resource/initialise.c: Likewise.
	* resource/ulimit.c: Likewise.
	* signal/init.c: Likewise.
	* sys/brk.c, sys/debug.c, sys/exec.c, sys/mman.c: Likewise.
	* sys/vfork.c: Likewise.
	* time/getitmr.c, time/setitmr.c: Likewise.
	* unix/close.c, unix/dirent.c, unix/getcwd.c: Likewise.
	* unix/ioctl.c, unix/lseek.c, unix/open.c, unix/pipe.c: Likewise.
	* unix/read.c, unix/readv.c, unix/reopen.c, unix/select.c: Likewise.
	* unix/tty.c, unix/write.c, unix/writev.c: Likewise.

	* time/setitmr.c (check_ticker): Optimise.

Thu Aug 16 11:23:16 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_syslib.s (sigstk): Delete.
	(__main): Fix indirection error when referencing __sigstksize.
	(no_old_area): Use local variables rather than % variables
	to kill warnings.
	(exit_with_error_no_memory): Change to an unconditional MOV.

Thu Aug 16 11:02:04 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__h_event): Don't set our own callback.

Thu Aug 16 10:17:58 2001  Alex Waugh <ajw498@ecs.soton.ac.uk>

	* swis.h: Add SysLog module macros.
	* unix/syslog.c (LogFile): Delete.
	(connected): Delete.
	(__progname): Delete.
	(vsyslog): Use Doggysoft's SysLog module.
	(openlog): Remove old socket code.
	(closelog): Likewise.

Thu Aug 16 10:07:01 2001  Alex Waugh <ajw498@ecs.soton.ac.uk>

	* common/unixify.c (__unixify): Ensure we allocate enough buffer
	space for the ,xyz filetype extension.

Wed Aug 15 17:22:19 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__seterr): Prevent corruption of v5.

Wed Aug 15 15:25:34 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* tmpfile.c (tmpfile): Fix logic error with the inlined fcntl.
	We were previously taking the action of failure, which cannot
	possibly happen.

Thu Aug  9 08:46:48 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* assert.c (__assert_fail): Change exp to const char*.
	* assert.h (__assert_fail): Likewise.

Wed Aug  8 19:41:10 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* kernel.h (struct stack_chunk): Fix GCC warning.
	* math.h (double, ldexp, scalb): Likewise.

Wed Aug  8 09:52:58 2001  Peter Burwood  <pjb@arcangel.dircon.co.uk>
			  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_signal.s: Add lots of explanations.
	(__seterr): New function.  Moved here from sys/os.c.
	(_kernel_last_oserror): Likewise.
	(__h_sigsegv1): Remove code that attempted to fixup the base
	register.  Only really of use for virtual memory.
	(__h_sigsys): Alter to call __h_cback directly rather than via
	SWI OS_CallBack.
	* sys/os.c: Delete file.

Wed Aug  8 09:44:05 2001  Nick Burrett  <nick.burrett@btinternet.com>

	Work towards a drop-in replacement for the SharedCLibrary.
	* swis.h: Renamed from sys/swis.h.
	(_swi, _swix, _FLAGS, _IN): Moved here from sys/os.h.
	(_INR, _OUT, _OUTR, _BLOCK, _RETURN, _C, _N, _Z): Likewise.
	* sys/os.h: Delete definitions above.
	* sys/swis.h: Delete file.
	* common/fdname.c: Include swis.s, not sys/swis.h.
	* common/riscosify.c: Likewise.
	* common/serial.c: Likewise.
	* locale/ctypetable.c: Likewise.
	* locale/strcoll.c: Likewise.
	* locale/strxfrm.c: Likewise.
	* locale/setlocale.c: Likewise.
	* resource/initialise.c: Likewise.
	* stdio/rename.c: Likewise.
	* sys/brk.c: Likewise.
	* sys/exec.c: Likewise.
	* sys/mman.c: Likewise.
	* sys/vfork.c: Likewise.
	* sys/syslib.c: Likewise.
	* time/strftime.c: Likewise.
	* time/stdtime.c: Likewise.
	* time/calendconv.c: Likewise.
	* time/broken.c: Likewise.
	* time/setitmr.c: Likewise.
	* time/gmtime.c: Likewise.
	* time/localtime.c: Likewise.
	* time/tzset.c: Likewise.
	* time/mktime.c: Likewise.
	* unix/dev.c: Likewise.
	* unix/tty.c: Likewise.
	* unix/rmdir.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/getcwd.c: Likewise.
	* unix/getenv.c: Likewise.
	* unix/pipe.c: Likewise.
	* unix/uname.c: Likewise.
	* unix/select.c: Likewise.
	* unix/unix.c: Likewise.
	* unix/setenv.c: Likewise.
	* unix/chdir.c: Likewise.

Tue Aug  7 17:44:26 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_coredump.s (backtrack_reinstall_loop): Replace occurrances
	of the check for APCS32 with {config}=26.
	* signal/sigexec.s (__unixlib_exec_sigstack): Likewise.
	(__unixlib_exec_sigstack_bsd): Likewise.
	(__unixlib_exec_sig): Likewise.
	* unixlib/asm_dec.s (MACRO return): Likewise.
	(MACRO stackreturn): Likewise.
	* sys/_jmp.s (__longjmp_l1): Likewise.

Tue Aug  7 16:13:28 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* conform: New directory.  This is a testsuite extracted from
	glibc 2.2.3 that tests the conformancy of C library headers.

Tue Aug  7 10:07:03 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_swi.s (__swihack): New.  Missing from initial checkin.
	(_swihack_build): Likewise.

Tue Aug  7 09:14:12 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_swi.s: New file.
	* sys/os.h (_swi, _swix): Add function prototype.
	(_FLAGS, _IN, _INR, _OUT, _OUTR, _BLOCK, _RETURN, _C, _N, _Z): Add
	supporting macros.
	* Makefile (SYS_ASM): Add _swis.o.

Mon Aug  6 09:16:22 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__h_sigint): Unset escape condition flag
	if escape not pressed.
	(__h_cback): Tidy up.

Mon Aug  6 09:11:55 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/unix.c (convert_command_line): Fix off-by-one error
	when creating temporary buffer for command line args.

Sat Aug 04 15:29:12 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/exec.c (set_dde_cli): Don't use strchr.
	(execve): If called from `system' then cope when command and
	arguments all appear in argv[1].
	(__exret): Ensure process->argc is set to zero.
	* sys/vfork.c (__vfork): Set child->argc earlier so if we do
	have memory problems, we at least will have the opportunity to
	free the vector.

Sat Aug 04 11:46:43 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* time/times.c (times): Add NULL check on argument.
	* unix/tty.c (__ttyioctl): Fix the FIXMEs in TIOCGETP and TIOCSETP.

Thu Aug 02 09:22:31 2001  Nick Burrett  <nick@dsvr.net>

	* vfork.c: Unset debugging mode.

Thu Aug 02 15:55:07 2001  John Tytgat  <John.Tytgat@aaug.net>

        Removing clashing symbols between UnixLib and OSLib.
        * clib/sys/os.h (__os_cli): Renamed from os_cli.
        (__os_byte): Renamed from os_byte.
	(__os_word): Renamed from os_word.
        * sys/_os.s: Likewise.
        * unix/gethostnam.c: Renamed os_byte to __os_byte.
        * unix/tty.c: Likewise.
        * sys/exec.c: Renamed os_cli to __os_cli.
	* time/time.c: Renamed from os_word to __os_word.

Thu Aug 02 14:26:42 2001  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve, __exret): Revert last change.  Was infact
	an off-by-1 error.
	* sys/_syslib.s (__main): Extra indirection needed to correctly
	set __sigstk.
	* sys/_vfork.s (vfork): Change final stack return from EQ to AL.
	Was dropping through to __vret.
	* sys/debug.c (__debug): Add __sigstk and __sigstksize output.
	* sys/vfork.c (__vexit): Additional logging.

Tue Jul 31 12:32:14 2001  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): ushift envp only if it already exists.
	(__exret): dshift envp only if it exists.

Tue Jul 24 17:11:43 2001  Nick Burrett  <nick@dsvr.net>

	* time/strftime.c (strftime): Call tzset -- reverts John Tytgat's
	change of 08-Nov-2000.

Mon Jul 23 16:30:46 2001  Peter Teichmann <teich-p@Rcs1.urz.tu-dresden.de>

	* time.h (struct tm): Change tm_zone to char*.
	* time/calendconv.c (__calendar_convert): Don't fixup tm_gmtoff,
	tm_isdst or tm_zone here.
	* time/ctime.c (ctime): Call tzset.
	* time/gmtime.c (gmtime): Set tm_gmtoff, tm_isdst and tm_zone.
	* time/localtime.c (localtime): Likewise.
	* time/mktime.c (mktime): Call tzset. Base tm_gmtoff, tm_zone
	and tm_isdst on values of tzname.
	* time/tzset.c (__tzname): Renamed from tzname.
	(tzname): New pointer version.
	(timezone, daylight): Zero-initialise.
	(tzset): Cope with 7 character time zone names.

Thu May 24 14:46:43 2001  Nick Burrett  <nick@dsvr.net>

	* sys/_alloca.s (__alloca): Use unconditional stackreturn
	otherwise we drop into __alloca_free.

Wed May  9 09:21:36 2001  Nick Burrett  <nick@dsvr.net>

	* signal/_signal.s: Add IMPORTs for __sigstk and __sigstksize.
	Remove IMPORT for __unixlib_exec_sig_interrupt.
	* objs/Makefile (SYS_ASM): Remove sys/_address.o

Thu May  3 08:35:46 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/tty.c (__ttyiraw): Check appropriate file descriptor
	flag for O_NDELAY.
	(__ttyicanon): Likewise.  If buffer is empty and we're doing
	non-blocking I/O, return and set errno to EAGAIN.

Thu May  3 08:27:13 2001  Peter Naulls  <peter@erble.freeserve.co.uk>
			  Nick Burrett  <nick@dsvr.net>

	* unix/tty.c (__ttyioctl): Implement TIOCSETAW, TIOCSETAF,
	TIOCGPGRP, TIOCSPGRP, TIOCLGET, TIOCLSET, TIOCGETP, TIOCSETP,
	TIOCGETC, TIOCSETC, TIOCGLTC and TIOCSLTC.

Thu May  3 07:14:49 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_os.s (os_console): Don't set input stream to listen on
	serial port.

Thu May  3 07:14:49 2001  Peter Naulls  <peter@erble.freeserve.co.uk>
			  Nick Burrett  <nick@dsvr.net>

	* signal/_signal.s (callback_signal): Use a semaphore to evade
	re-entrancy problems.  We cannot be certain about the size or
	state of the USR stack, so provide our own.  Merge the functionality
	of __unixlib_exec_sig_interrupt into here.
	(__h_event): Preserve flags on exit.
	(__h_cback, __cbflg): Clarify.
	* signal/sigexec.s (__unixlib_exec_sig_interrupt): Delete function.
	* sys/_syslib.s (__main): Reserve __sigstksize bytes for the
	callback_signal stack.
	(__sigstk): Define.
	(__sigstksize): Define.  Set default stack size of 4096 bytes.

Tue Jan  2 10:20:30 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/coredump.c: Delete file.
	* sys/_address.s: Delete file.
	* unixlib/local.h (__address_valid): Delete decl.

Fri Dec 29 11:49:55 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_mem.s (__memcpy_cu_l1): Fix typo in return regs.
	* Docs/Changes: Delete file.

Thu Dec 21 15:07:42 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Do some of the leg-work required to support APCS-32.
	* unixlib/asm_dec.s (MACRO return): New MACRO.
	(MACRO stackreturn): New MACRO.
	* All assembler files: All files changed to use the MACROs return
	and stackreturn for function exit.

Wed Nov 29 12:40:26 2000  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/scanf.c (vfscanf): fix for infinite loop when skipping spaces.
	Reading fixed length string did not consume enough input characters.
	(problem found by Vincent Lefevre)

Wed Nov 08 10:21:26 2000  John Tytgat  <John.Tytgat@aaug.net>

	* time/broken.c (__cvt_broken_time): Reduced stack requirements.
	Added workaround for month overflow problem in the Territory/UK module.
	* time/calendconv.c (__calendar_convert): Removed tzset call (not
	needed).
	* time/mktime.c (mktime): Likewise.
	* time/strftime.c (strftime): Likewise.
	* clib/time.h (mktime): argument "struct tm *" is not const.
	* time/mktime.c(mktime): argument "struct tm *" is not const and
	tm_wday & tm_yday are now correctly filled in (not in __tz variable).
	* unix/fstat.c (fstat): set regs[3] to zero too when it is not a
	RISC OS device.
	* unix/stat.c (stat): stat("/dev/null") didn't work.

Sun Aug 20 12:04:34 2000  John Tytgat  <John.Tytgat@aaug.net>

	* errno.c (errno): Remove volatile, for POSIX conformance.
	* sys/_syslib.s (__wimpprogram): Export.

Thu Aug 17 17:17:22 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Re-write command line and environment passing between processes.
	Arguments are now passed on the command line rather than both the
	command line and the proc structure.
	* sys/unix.h (struct proc): Delete clean_argv, clean_argb, envb, argb.
	Add envc and cli.
	* sys/debug.c (__debug): Fix for new proc structure and print
	environment vector.
	* sys/exec.c (__ushift): Comment.
	(execve): Use os_print for debugging.  Print environment vector.
	Re-write the code for building argv and envp for the child process.
	Cope properly with " and ' in arguments.  Don't copy new argv into
	struct proc - leave this task up to __unixinit.  Major tidyup.
	Don't prepend command line with a '/' because we won't be able to
	call RISC OS builtin commands.
	(__exret): Fixup for new struct proc.
	* sys/execl.c (execl): Initially allocate memory for 8 arguments.
	* sys/vfork.c (free_process): New function.
	(__vfork): Clean up.  Re-write argv and envp inheritance.
	Call free_process on error.
	(__vexit): Call free_process.  Tidy up.
	* sys/_exec.s: Annotate.  So that in the future I don't have such a
	hard time trying to figure out what it does.
	* unix/unix.c (__unixinit): Simplify because we know that the command
	line arguments are always taken from the CLI.
	Print a more descriptive error message when something serious fails.
	(__unixexit): More descriptive __debug statements.
	(find_terminator): Optimise function.
	(initialise_process_structure): Delete #if 0 code.
	(convert_command_line): Re-work now that we've changed struct proc.
	Cope with an infinite command line length.

	* sys/brk.c (brk, sbrk): Add some debugging code.
	* sys/execvp.c (execvp): Add some debugging code.
	* unix/features.c: Likewise.
	* unix/getenv.c (__chkenv, __addenv): Likewise.

	* unix/getcwd.c (getcwd): Change unixify_path call to a __unixify_std
	call.

Wed Jul  5 15:58:27 2000  John Tytgat  <John.Tytgat@aaug.net>

	* clib/errno.h (errno): Remove volatile, for POSIX conformance.
	* unix/fchmod.c: Remove garbade from header.

Mon Jul  3 12:31:38 2000  John Tytgat  <John.Tytgat@aaug.net>

	* sys/syslib.h (__wimpprogram): Declare.
	* unixlib/asm_dec.s (XWimp_ReadSysInfo): Define.
	* sys/_syslib.s: Initialise __wimpprogram.
	* time/getitmr.c (getitimer): Change test for __taskwindow to
	__wimpprogram.
	* time/setitmr.c (setitimer): Likewise.
	* signal/sleep.c (sleep): Likewise.
	* unix/unix.c (__stop_itimers): Likewise.

Mon Jul  3 12:19:27 2000  John Tytgat  <John.Tytgat@aaug.net>

	* common/unixify.c (unixify): Fix suffix swapping for "c.dev".

Mon Jul  3 12:14:10 2000  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Change "RiscOS" to "RISC OS".
	* qsort.c: Change PARANOID to __PARANOID.
	* common/unixify.c (__unixify): Filetype extension marker is
	a comma, not a dot.

Sat Jun 10 13:58:43 2000  John Tytgat  <John.Tytgat@aaug.net>

	Support `,xyz' RISC OS file type extensions on filenames.
	* dirent.h (telldir): Return __off_t.
	(struct __os_gbpb_10): New struct.
	(struct __dir_stream): Add suffix, dd_suf_off.  Change type of
	dir_cache and dir_cache_index to __os_gbpb_10.  Change do_read to
	__u_int.  Make dirent not a pointer.  Place conditionally in
	__UNIXLIB_INTERNALS.
	* unixlib/swiparams.h: New file.
	* unixlib/local.h (__sfixfind): Declare.
	(__RISCOSIFY_FILETYPE_EXT): Define.
	(__RISCOSIFY_FILETYPE_FFF_EXT): Define.
	(__RISCOSIFY_FILETYPE_NOTFOUND): Define.
	(__RISCOSIFY_FILETYPE_NOTSPECIFIED): Define.
	(__riscosify, __riscosify_std, __unixify): Add __filetype argument.
	(__unixify_std): Add declaration.
	* unixlib/asm_dec.s (USEFILEPATH): Define.
	* common/exist.c (__isdir): Add support for filetype extension.
	(__object_exists): Likewise.
	* common/riscosify.c (__sfixinit): Free previously allocated memory.
	(__sfixfind): Make global.
	(__riscosify_std): Add filetype argument.
	(__riscosify): Add filetype argument.  Support filetype extension.
	* common/serial.c (__get_file_ino): Support filetype extension.
	* common/uname.c (__uname): Likewise.
	* common/unixify.c (__unixify_std): New function.
	(__unixify): Add filetype argument.  Support filetype extension.
	* stdio/rename.c (rename): Support filetype extension.
	* unix/chdir.c (chdir): Likewise.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	* unix/dirent.c (GBPB_FAKE_CURRENTDIR): Define.
	(GBPB_FAKE_PARENTDIR): Define.
	(GBPB_START_ENUM): Define.
	(GBPB_END_ENUM): Define.
	(GBPB_MAX_ENUM): Define.
	(newstream, opendir, readdir_r, readdir): Support filetype extension.
	(telldir, seekdir, rewinddir, closedir): Likewise.
	* sys/exec.c (execve): Fix call to __riscosify.
	* unix/fstat.c (fstat): Support filetype extension.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/rmdir.c (rmdir): Likewise.
	* unix/stat.c (stat): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* unix/getcwd.c (unixify_path): Delete function.
	(getcwd): Call unixify_std instead.
	* unix/truncate.c (truncate): Fix call to __riscosify_std.

Sat Jun 10 09:58:21 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Prevent compiler warnings.
	* math/j0.c (pzero, qzero): Initialise p and q.
	* math/j1.c (pone, qone): Likewise.
	* math/jn.c (jn, yn): Likewise.
	* math/lgamma_r (lgamma_r): Initialise temp.
	* math/log1p.c (log1p): Initialise f, c and hu.
	* math/rem_pio2.c (rem_pio2): Initialize z.
	* strtod.c (Storeinc): Add parentheses.
	(__dtoa): Initialise ilim, ilim1, spec_case, mlo.
	* sys/syslib.h (__resource_initialise): Delete declaration.
	(__unixlib_signal_initialise): Delete declaration.
	* stdio/stdio.c: Include stdlib.h.
	* wchar.h: Disable inline functions.
	* wchar/wcstok.c (wcstok): Fix ambiguous else warning.  Uncomment
	__set_errno.

Sat Jun 03 16:21:34 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* wchar/btowc.c: New file.
	* wchar/mbrlen.c: New file.
	* wchar/mbrtowc.c: New file.
	* wchar/mbsinit.c: New file.
	* wchar/mbsnrtowcs.c: New file.
	* wchar/mbsrtowcs.c: New file.
	* wchar/wcpcpy.c: New file.
	* wchar/wcpncpy.c: New file.
	* wchar/wcrtomb.c: New file.
	* wchar/wcscat.c: New file.
	* wchar/wcschr.c: New file.
	* wchar/wcscmp.c: New file.
	* wchar/wcscoll.c: New file.
	* wchar/wcscpy.c: New file.
	* wchar/wcscspn.c: New file.
	* wchar/wcsdup.c: New file.
	* wchar/wcslen.c: New file.
	* wchar/wcsncat.c: New file.
	* wchar/wcsncmp.c: New file.
	* wchar/wcsncpy.c: New file.
	* wchar/wcsnrtombs.c: New file.
	* wchar/wcspbrk.c: New file.
	* wchar/wcsrchr.c: New file.
	* wchar/wcsrtombs.c: New file.
	* wchar/wcsspn.c: New file.
	* wchar/wcsstr.c: New file.
	* wchar/wcstod.c: New file.
	* wchar/wcstof.c: New file.
	* wchar/wcstok.c: New file.
	* wchar/wcstol.c: New file.
	* wchar/wcstold.c: New file.
	* wchar/wcstoq.c: New file.
	* wchar/wcstoul.c: New file.
	* wchar/wcstouq.c: New file.
	* wchar/wcswidth.c: New file.
	* wchar/wcsxfrm.c: New file.
	* wchar/wctob.c: New file.
	* wchar/wcwidth.c: New file.
	* wchar/wmemchr.c: New file.
	* wchar/wmemcmp.c: New file.
	* wchar/wmemcpy.c: New file.
	* wchar/wmemmove.c: New file.
	* wchar/wmemset.c: New file.
	* wchar.h: New file.
	* Makefile (WCHAR): Add new files.

Sat Jun 03 16:26:06 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* fenv.h (fesetexceptflag): Use const rather than __const.
	* math/exp2.c: Include stdlib.h.
	* complex.h: For Acorn C compiler, define _Complex, __real__,
	__imag__ and __complex__ to empty strings.  This is simply to
	get Acorn C to compile UnixLib rather than make a working complex
	math library.
	* complex/conj.c (conj): Hack compilation for Acorn C.
	* !Help: Add a note warning of a broken complex library.

	* Docs/ReadMe38: Updated.

Sat Jun 03 15:53:18 2000  John Tytgat  <John.Tytgat@aaug.net>

	* fenv.h (fesetenv, feupdateenv): Use const rather than __const.
	* unix/write.c (write): Change __FEATURE_DEV_PIPE to __FEATURE_PIPEDEV.
	* unix/dev.c: Include string.h.

Sat Jun 03 15:44:21 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c: Undefine DEBUG.
	* signal/post.c (__unixlib_internal_post_signal): Use os_print for
	debug messages rather than printf.  This cleans up the display when
	running UnixLib with full debug.
	(__unixlib_raise_signal): Likewise.
	* signal/setup.c (__unixlib_setup_sighandler): Likewise.
	* signal/sigprocmsk.c (sigprocmask): Likewise.
	* signal/sigsuspend.c (sigsuspend): Likewise.
	* signal/sleep.c (sleep): Likewise.
	* common/riscosify.c (__sfixinit): Likewise.
	(__riscosify): Likewise.  Inline the assert call.
	(__eprintf): Delete function.
	* signal/siginfo.c (__unixlib_siginfo_handler): Merge os_nl into
	os_print.

Sat Jun 03 15:26:46 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Remove command line length restriction - based on the work originally
	done by John Tytgat <John.Tytgat@aaug.net>.
	* unix/unix.c (__unixinit): Use a malloc buffer for the incoming
	command string.
	(create_process_structure): Don't malloc buffers for argv and argb
	here.
	(convert_command_line): Check argc doesn't exceed
	`command_line_size >> 1'. This should make it parse many one character
	arguments.
	(check_io_redir): Renamed from check_for_io_redirection.  Function
	re-written to remove code duplication and simplified.
	(get_io_redir): Created from check_for_io_redirection.
	(verify_redirection): Return an int.  Simplified.
	(find_redirection_type): Re-write.
	(initialise_unix_io): Tidy code.  When allocating an fd for stderr,
	directly access the fd array rather than using __alloc_file_descriptor.
	* sys/param.h (MAXCOMMANDLEN): Delete.
	* sys/exec.c (execve): Use command line length to create the buffer
	space for `cli'.  Remove check for length exceeding MAXCOMMANDLEN.
	Stipulate that __codeshift must be greater than command line length.
	* sys/execlp.c (execlp): Remove MAXCOMMANDLEN restriction.
	* sys/execle.c (execle): Likewise.
	* sys/execl.c (execl): Likewise.
	* sys/syslib.h (__resource_initialise): Delete decl.
	(__unixlib_signal_initialise): Delete decl.

	Fix compiler errors.
	* math.h (fpclassify): Remove splurious semi-colon.
	(fma, fmin, fmax, fdim, log2, lrint, llrint): Likewise.
	(nearbyint, trunc, signbit): Likewise.
	* signal/_signal.s: Use errno rather than __errno.

	Code clean up.
	* resource/initialise.c (__resource_initialise): Take struct proc
	as an argument. Re-write function to set variables in that argument
	rather than the global __u.
	* signal/init.c (__unixlib_signal_initialise): Likewise.
	* unix/unix.c (create_process_structure): Take no argument.  Return
	a struct proc as the result instead of directly writing to __u.
	(initialise_process_structure): Simplified.
	(__unixinit): Re-written and simplified, reducing code duplication.
	(find_terminator): Return a const char*.

	* !MKDir: Create directories for complex, math-asm, scl and string.
	* objs/Makefile (CCfeatures): Define as empty.

Sat Jun 03 13:20:28 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/signame.c (__unixlib_internal_signame_init): Delete function.
	(sys_siglist): Statically define signals in here.
	* unixlib/sigstate.h (__unixlib_internal_signame_init): Delete decl.

	* locale/ctypetable.c (__build_ctype_tables): Optimised.

Wed Jan 12 16:55:36 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* inttypes.h: New header file.
	* stdint.h: New header file.
	* strtoimax.c: New file.
	* strtoumax.c: New file.
	* strtoll.c: New file.
	* strtoull.c: New file.

	* math.h: Add GCC __const__ attribute to some functions.

Wed Jan 12 16:50:51 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/features.c (features): Check UnixEnv$prog$sfix and initialise
	riscosify.
	(__sfix_default): Define.
	* unix/unix.c (__unixinit): Remove call to __riscosify_init.
	* common/riscosify.c (__sfix_default): Move to features.c.
	(__riscosify_init): Delete function.
	(__sdirinit): Rename from sdirinit and make globally accessable.
	(__sfixinit): Rename from sfixinit and make globally accessable.
	(sfix_hash): Declare inline for GCC.

	* sys/_syslib.s (__real_break): Declare here.
	* sys/brk.c (__real_break): Declare extern.

	* stdio/freopen.c (freopen): Set EINVAL if filename is NULL.

	* signal/signame.c (sys_siglist): Define signals at compile time.
	(__unixlib_internal_signame_init): Delete.
	* sys/syslib.c (_main): Don't call __unixlib_internal_signame_init.

	* sys/_exec.s (__exec_rtn_corrupt): Call _exit rather than abort.

	* unix/unix.c (initialise_unix_io): Inline fcntl call to duplicate
	the stdout file descriptor.
	(check_fd_redirection): Inline fcntl file descriptor duplication call.
	* stdio/fopen.c (fdopen): Inline fcntl call.
	* stdio/tmpfile.c (tmpfile): Likewise.
	* stdio/newstream.c (__getmode): Initialise mptr using a cast rather
	than call memset. Replace switch statements with if..elseif for
	improved code generation. Remove final real/write sanity check.
	* stdio.h (__getmode): Alter decl. appropriately.

	* unix/dev.c (__fslseek): Tidy up.
	(__pipewrite): Likewise.
	(__pipeclose): Likewise.
	(__fsclose): Likewise.

	* sys/unix.h (__unixlib_fatal): Add GCC's __noreturn__ attribute.

	* sys/brk.c (brk): Inline getrlimit call.

	* stdio/freopen.c (freopen): Check validity of `mode' here.
	* stdio/fopen.c (fopen): Likewise.
	* stdio/newstream.c (__getmode): Remove check for mode == NULL.
	Change return type to __io_mode; remove __io_mode parameter.

Thu Nov 18 12:25:07 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* math/llrint.c: Only GCC can compile this file.
	* math/llround.c: Likewise.
	* math.h (llround): Declare.

Thu Nov 18 12:18:07 1999  Nick Burrett  <nick.burrett@btinternet.com>

	Move SharedCLibrary functions to their own directory.
	* scl: New directory.
	* scl/_kernel.s: Moved from directory sys.
	* scl/_kgetenv.s: Likewise.
	* scl/_kosargs.s: Likewise.
	* scl/_kosbget.s: Likewise.
	* scl/_kosbput.s: Likewise.
	* scl/_kosbyte.s: Likewise.
	* scl/_koscli.s: Likewise.
	* scl/_kosfile.s: Likewise.
	* scl/_kosfind.s: Likewise.
	* scl/_kosgbpb.s: Likewise.
	* scl/_kosrdch.s: Likewise.
	* scl/_kosword.s: Likewise.
	* scl/_koswrch.s: Likewise.
	* scl/_ksetenv.s: Likewise.
	* scl/_kswi_c.s: Likewise.
	* scl/_memchk.s: Likewise.

	* kernel.h (_kernel_current_stack_chunk): Declare.
	* scl/_kcurskch.s: New file. Implement it.

	* complex.h: Add missing header file.

Tue Nov 16 13:45:59 1999  John Tytgat  <John.Tytgat@aaug.net>

	* time/setitmr.c (add_ticker): Time for OS_CallAfter was wrongly
	calculated.
	* signal/sleep.c (sleep): Don't block forever when called in a
	Taskwindow due to alarm not working.

Tue Nov 16 13:33:50 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* math-asm/_sincos.s: New file.
	* math.h (__sincos): If __UNIXLIB_INTERNALS then declare __sincos.

	* unixlib/math.h (signbit, copysign, finite): If __GNUC__ and
	optimising then define inline versions of these functions.

	* complex.h: New header file.
	* complex/cabs.c: New file.
	* complex/cacos.c: New file.
	* complex/cacosh.c: New file.
	* complex/carg.c: New file.
	* complex/casin.c: New file.
	* complex/casinh.c: New file.
	* complex/ccos.c: New file.
	* complex/ccosh.c: New file.
	* complex/cexp.c: New file.
	* complex/cimag.c: New file.
	* complex/clog.c: New file.
	* complex/clog10.c: New file.
	* complex/conj.c: New file.
	* complex/cpow.c: New file.
	* complex/cproj.c: New file.
	* complex/creal.c: New file.
	* complex/csin.c: New file.
	* complex/csinh.c: New file.
	* complex/csqrt.c: New file.
	* complex/ctan.c: New file.
	* complex/ctanh.c: New file.

Tue Nov 16 13:30:56 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* Docs/Copyright: New file.

	* math-asm: New directory. Move all files from math/*.s here
	to workaround RISC OS 77 file directory limit.
	* Makefile: Updated.

	* fenv.h: New header file.
	* math-asm/_flrexcpt.s: New file.
	* math-asm/_fegetenv.s: New file.
	* math-asm/_fegetrnd.s: New file.
	* math-asm/_feholdexc.s: New file.
	* math-asm/_fesetenv.s: New file.
	* math-asm/_fesetroun.s: New file.
	* math-asm/_fraiseexc.s: New file.
	* math-asm/_fsetexcpt.s: New file.
	* math-asm/_ftstexcpt.s: New file.

	* math.h: Include machine/nan.h.
	(FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL): Define.
	(fpclassify): Declare.
	(FP_ILOGB0): Define.
	(FP_ILOGBNAN): Define.
	(isfinite): Define.
	(isnormal): Define.
	(isgreater, isgreaterequal): Define.
	(isless, islessequal): Define.
	(islessgreater): Define.
	(isunordered): Define.
	* math/fpclassify.c: New file.
	* math/fma.c: New file.
	* math/fmin.c: New file.
	* math/fmax.c: New file.
	* math/fdim.c: New file.
	* math/lrint.c: New file.
	* math/llrint.c: New file.
	* math/log2.c: New file.
	* math/nearbyint.c: New file.
	* math/remquo.c: New file.
	* math/trunc.c: New file.

	* math/exp.c: New file.
	* math/exp2.c: New file.
	* math/exp10.c: New file.
	* math/t_exp.c: New file.
	* math/round.c: New file.
	* math/lround.c: New file.
	* math/llround.c: New file.
	* math-asm/_signbit.s: New file.
	* machine/huge_val.h (HUGE_VALL): Renamed from HUGE_VALl.
	(HUGE_VALF): Renamed from HUGE_VALf.

Tue Nov 16 13:25:15 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/dev.h (struct dev): Change `open' return type to void*.
	(__fsopen, __ttyopen, __pipeopen, __sockopen): Fix accordingly.
	(__nullopen): Likewise.
	* unix/dev.c (__fsopen, __ttyopen, __pipeopen): Likewise and
	ensure all return types are cast to void*.
	(__sockopen, __nullopen): Likewise.
	* unix/tty.c (__ttyopen): Likewise.
	* unix/open.c (__open): Recognise that `open' now returns void*.

	* unixlib/fd.h (struct __unixlib_fd): Make `dflag' 16 bits,
	saving 4 bytes per file descriptor.
	(__alloc_file_descriptor): Wrap in `__UNIXLIB_INTERNALS'.
	* unix/dev.c (__fsopen): If file is a directory then use `opendir'.
	(__fsclose): If file is a directory then use `closedir'.
	(__fsread): If file is a directory then use `readdir_r'.
	* unix/fstat.c (fstat): Handle file canonicalisation when file
	is a directory.

	* common/riscosify.c (__riscosify): RISC OS pathname `@.c' was
	incorrectly translated to `@./c'.

	* unixlib/features.h: Make macros re-definable at compile time.
	* unix/dev.c (__FEATURE_*): Make macro checks #if rather than a
	#ifdef/#ifndef check.
	* stdio.h: Likewise.
	* dirent.h: Likewise.

	* common/attrib.c (__set_protection): Re-write to open up better
	optimisation by the compiler.
	(__get_protection): Likewise.

	* sys/os.c (__seterr): Inlined string copy to remove function
	prologue overhead and re-ordered lines for better opimisation by
	the compiler.

	* unix/unix.c (initialise_unix_io): Replace `dup' with `fcntl'.
	(check_fd_redirection): Replace `dup2' with `fcntl'.

	* unix/write.c (write): Raise SIGPIPE if __FEATURE_DEV_PIPE is
	defined.

	* math/drem.c: New function.

	* strsep.c (strsep): Don't return NULL if begin[0] is 0.
	* strtoul.c (strtoul): If the input is negative, then return 1 minus
	the result, rather than returning EINVAL.

Fri Sep 24 16:38:35 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/syslib.h (__ALLOCA_FATAL, __PARANOID): Move macro definitions
	from here
	(__DYNAMIC_AREA, __4K_BOUNDARY, __USEFILEPATH): Likewise
	* unixlib/features.h: ... to here. New file.
	(__INTEGRITY_CHECK): New macro - define it by default.
	(__FEATURE_ITIMERS): New macro.
	(__FEATURE_SOCKET): New macro.
	(__FEATURE_PIPEDEV): New macro.
	* stdio.h: Include unixlib/features.h.
	(__validfp): Define as 1 if `__INTEGRITY_CHECK' is undefined.
	* dirent.h (__validdir): Likewise.
 	* stdio/newstream.c (__newstream): Replace `__validfp' check with an
 	inline version.

	* sys/syslib.c (_exit): Remove `COMPLETE_CRAP' code.

	* sys/vfork.c (__vexit): Call `__stop_itimers' only if
	`__FEATURE_ITIMERS' is defined.
	* sys/exec.c (execve): Likewise.
	* sys/syslib.c (_exit): Likewise.
	* unix/unix.c (__unixexit): Likewise.

	* sys/alarm.c (alarm): If `__FEATURE_ITIMERS' is undefined then
	set `errno' to ENOSYS and return.
	* time/setitmr.c (setitimer): Likewise.
	* unix/pipe.c: Likewise.

	* unix/unix.c (__stop_itimers): Define if `__FEATURE_ITIMERS' is
	defined.
	* time/setitmr.c (remove_ticker, add_ticker): Likewise.
	(check_ticker, struct timer_control): Likewise.

	* unix/dev.c (__dev): Include __pipe* function pointers only if
	`__FEATURE_PIPEDEV' is defined.
	Include __sock* function pointers only if `__FEATURE_SOCKET' is
	defined.
	(__pipeopen): Define if `__FEATURE_PIPEDEV' is defined.
	(__pipeclose, __piperead, __pipewrite, __pipelseek): Likewise.
	(__pipeioctl, __pipeselect): Likewise.
	(__sockopen): Define if `__FEATURE_SOCKET' is defined.
	(__sockclose, __sockread, __sockwrite, __socklseek): Likewise.
	(__sockioctl, __sockselect): Likewise.

	* sys/_udiv.s: Fix typo in C$code.

	* signal/_coredump.s (__write_corefile): We output a stack backtrace
	rather than an corefile.
	* signal/post.c (__unixlib_internal_post_signal): `sigwakeup' doesn't
	do much, so inline it.

Fri Sep 21 12:19:15 1999  John Tytgat  <John.Tytgat@barco.com>

	* common/unixify.c (__unixify): Fix the return values that would
	otherwise break `getcwd'.

Tue Sep 21 11:45:41 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (TMP_MAX): Reduce size to fit into a signed 32-bit
	type.

Tue Sep 21 11:38:03 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_os.s (os_prdec): New function.
	* sys/os.h (os_prdec): Declare.
	* unixlib/asm_dec.s (XOS_ConvertInteger1): Define.
	(XOS_ConvertInteger2, XOS_ConvertInteger3): Define.
	(XOS_ConvertInteger4): Define.
	* unix/write.c: Minor debug statement improvements.
	* unix/dev.c: Likewise.
	* stdio/flsbuf.c: Likewise.
	* stdio/fwrite.c: Likewise.
	* stdio/fpos.c: Likewise.
	* stdio/freopen.c: Likewise.
	* stdio/fopen.c: Likewise.
	* stdio/fclose.c: Likewise.

	* stdio/fpos.c (ftell): On streams open for read/write, flush the
	output buffer before attempting to calculate the file position.

	* Changelog: Tidy up.

Fri Aug 20 09:28:15 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* gcccompat/_udivdi3.s: New file.
	* gcccompat/_umoddi3.s: New file.
	* gcccompat/_divdi3.s: New file.
	* gcccompat/_moddi3.s: New file.

Wed Aug 01 13:02:06 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* stddef.h (NULL): Remove cast to void *.
	* errno.h (errno): Define if not already defined.
	Declare `errno' and defined `__errno' as a macro to point to it.
	(ED, EIEIO): Removed.
	* unixlib/asm_dec.s (__set_errno): Use `errno'.
	(__get_errno): Define.
	* netlib/_net_error.s: Import `errno'.
	* sys/errlist.c: Remove ED and EIEIO.
	* netlib/htonl.s: Remove embedded function name.
	* netlib/htons.s, netlib/ntohl.s, netlib/ntohs.s: Likewise.

Tue Jul 27 21:09:00 1999 CL0085
John Tytgat <John.Tytgat@barco.com>

	* sys/syslib.h: Add RISC OS 4 version identifier

Tue Jul 27 21:09:00 1999 CL0084
John Tytgat <John.Tytgat@barco.com>

	* kernel.h (_kernel_oscli): Add prototype.

Thu May 06 20:00:00 1999 CL0083
Simon Callan <simon@callan.demon.co.uk>

	* Add small test programme, and build for release.

Mon Feb 15 20:00:00 1999 CL0082
Simon Callan <simon@callan.demon.co.uk>

	* Correct small problem with make file

Sun Jan  3 16:04:11 1999 CL0081
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/features.c: New file.
	* sys/unix.h (__runtime_features): Declare.
	* unix/unix.c (__unixinit): Call it.
	* Makefile: Added unix/features.c.

	* stpcpy.c (stpcpy): Add parentheses to remove GCC warnings.
	* strcat.c (strcat): Likewise.
	* strcpy.c (strcpy): Likewise.
	* strcspn.c (strcspn): Likewise.
	* strncat.c (strncat): Likewise.
	* strpbrk.c (strpbrk): Likewise.
	* strspn.c (strspn): Likewise.
	* termcap.c (tgetent): Re-arrange code to remove GCC warnings.
	(t_tentcp, tgetnum, tgoto, tputs): Likewise.
	* common/riscosify.c (def_map): Likewise.
	(__sfixfind): Re-ordered 'if' logic.
	(__sfix_default): Add 'ii'.
	(__riscosify): Case 'char' subscripts to 'unsigned char'.
	(everywhere): Formatting changes.
	* stdio/rename.c (rename): Re-arrange code to remove GCC warnings.
	* stdio/tmpfile.c (generate_temporary_filename): Likewise.
	* sys/debug.c (__debug): Likewise.
	* sys/exec.c (execve): Likewise.
	* unix/dirent.c (readdir_r): Likewise.
	* unix/getenv.c (__addenv): Likewise.
	* unix/unix.c (convert_command_line): Likewise.

	* unix/select.c (select): Use 'clock' to read the monotonic time.

	* Docs/ReadMe: New file.
	* Docs/ReadMe38: Updated.

Sat Dec 12 12:32:09 1998 CL0080
Nick Burrett  <nick.burrett@btinternet.com>

	* alloc.c (RISCOS_CCBUG): Don't define if compiling with GCC.
	* stdio.h: Don't use pragmas if compiling with GCC.
	* signal/_coredump.s (backtrace_register_dump_loop_end): Use a
	number instead of a string in SWI OS_WriteI expression.
	(backtrace_print_function_name_found): Likewise.

Wed Oct 07 21:05:15 1998 CL0079
Nicholas Clark <nick@unfortu.net>

	* stdio/perror.c: For a null pointer perror() is supposed to print only
	the error message, not treat the null pointer as a null string.

Sun Oct 04 22:25:31 1998 CL0078
Nicholas Clark <nick@unfortu.net>

	* stdio/fread.c: Was adding (bytes read) to file offset for reads
	satisfied from stdio buffer. Result was that fseek SEEK_CUR (and ftell)
	would be wrong position in file.
	* stdio/fwrite.c: Likewise.

Thu Sep 24 20:47:00 1998 CL0077
Nicholas Clark <nick@unfortu.net>

	* clib/sys/dev.h: Prototype for __pipeselect()
	* unix/dev.c (__pipeselect): Check if there is data in the pipe ready
	to read.
	* unix/dev.c (__pipewrite): Allow more data to be written to a pipe
	after reading data has commenced.

Thu May 07 14:45:47 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* sys/_alloca.s: Reorder LDR to optimise for StrongARM
	* sys/_exec.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_vfork.s: Likewise.

Sun Jun 21 19:36:45 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* unix/getenv.c (__getenv_from_os): Free buffer and call malloc
	again, to save unnecessary copying of (garbage) contents.

Thu Jul 23 14:17:44 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (sfixinit, __sfixfind): Replaced binary search
	lookup with array of linked lists keyed by a hash function. Clearer,
	smaller, presumably faster and avoids OS_HeapSort. Why did I implement
	binary search in the first place?

Fri Jul 24 10:40:07 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* signal/_signal.s: Removed two gramatically incorrect "'"s spotted
	by Peter Naulls.
	* sys/os.h: RISC OS not RiscOS in comment.
	* sys/dev.h: Likewise.
	* sys/syslib.h: Likewise.
	* stdio/rename.c: Likewise.

Sun Jul 26 23:58:14 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* signal/_coredump.s: 3 should be 12 (ie 3 * 4) in the definitions of
	__calling_environment_end and __c_environment_end as you don't get
	pointer arithmetic in assembler. Second LDR ip was actually ADR ip.

Fri Jun 05 18:12:47 1998 CL0075
Nick Burrett  <nick.burrett@btinternet.com>

	* math/_ldexp.s: Second parameter is an int, not a double.
	* clib/termios.h (__TERMIOS_H): Rename from _TERMIOS_H.

Sat May 09 15:37:33 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* clib/sys/unix.h: Add clean_argb and clean_argv to process struct
	* sys/debug.c: Dump clean_argv and clean_argb
	* sys/exec.c (execve): Reset clean_argv and clean_argb
	* sys/vfork.c (__vfork): Create child argv from clean_argv
	* unix/unix.c (convert_command_line_): Create clean_argv and
	clean_argb

Thu May 07 14:45:47 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* clib/unixlib/asm_dec.s: Correct typos in comments.
	* netlib/_net_error.s: Spotted spelling mistake in comment
	* signal/_coredump.s: Reorder LDR to optimise for StrongARM
	* signal/_signal.s: Likewise.
	* sys/_alloca.s: Likewise.
	* sys/_exec.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_syslib.s: Likewise.
	* sys/_vfork.s: Likewise.
	* strchr.c: BUG fixed - now casts to (char)
	* strrchr.c: Likewise.
	* memchr.c: Likewise.

Mon May 04 15:13:08 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* sys/syslib.c: Replace (r) by (return_code) inside #ifdef DEBUG
	* unix/tty.c (__ttyrc): Ensure '\r' is actualy output, else "\r\n"
	sent to tty appears as "\n". ("\n\r" output as "\n\r" with and without
	this change)

Sun May 03 16:22:49 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (__riscosify): Add check so that
	"<GCC$Dir>.foo" and "<GCC$Dir>/foo" both convert to "<GCC$Dir>.foo"
	* unix/getenv.c (__getenv_from_os): When failing to read macro
	variable expansion due to buffer overflow r[2] not always equal to 2.
	Changed buffer overflow check to test that error number is 0x1E4
	* sys/_syslib.s (__main): Do not assume *anything* about
	registers when XOS_DynamicArea or XOS_ChangeEnvironment fail. Minor
	optimisations to exit_with_error and CallASWI check.

Thu Apr 30 17:42:08 CL0073
1998 Nicholas Clark <nick@unfortu.net>

	* termios/tcsetattr.c: Cast (char) -1 in error check after loop that
	searches __bsd_speeds[].
	* termios/cfsetispeed.c: New file.
	* termios/cfsetospeed.c: New file.
	* termios/cfsetispeed.c: New file.
	* termios/cfsetospeed.c: New file.
	* sys/syslib.c: Remove call to __resource_initialise() - 1) at this
	point the call attempts to use undefined values, 2) it is called
	later in unix/unix.c.

Mon Jan 12 22:53:48 CL0072
1998 Nicholas Clark <nick@unfortu.net>

	* sys/_os.s(os_prhex): Re-written - 3 words shorter, 1 loop removed.
	* sys/_syslib.s(__main): Revised code to generate dynamic area name -
	code output unchanged but new algorithm somewhat shorter
	* clib/unixlib/asm_dec.s: Added XOS_WriteI
	* signal/_coredump.s: replaces sys/coredump.c
	* signal/_signal.s(__core): moved to _coredump.s to allow a tail
	optimisation.
	* signal/coredump.c: Re-written in assembler - deleted

Sun Jan 11 17:35:24 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* signal/_signal.s: Store sp in callback handler *without* write back.

Thu Jan 08 17:26:49 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c: Moved __riscosify_control to separate file
	* common/riscosifyc.c: __riscosify_control

Sat Jan 03 00:10:25 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* sys/_os.s os_swi: use lr rather than fp to load registers (save on
	stack over SWI so SVC safe) - preserves fp for stack backtrace if SWI
	causes a signal.

Fri Jan 02 00:49:15 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (__riscosify): Code to find end of disc name
	now more sophisticated - recognises ".$" and '/', and can reliably
	detect full native pathnames.

Fri Dec 26 15:34:24 1997 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/stat.c: set X bit from R bit for all filetypes except Text and
	Data.

Thu Dec 25 12:00:00 1997 CL0071
Nicholas Clark  <nickc@liv.ac.uk>

	* unix/dev.c __fsopen: if OS_File 18 fails to create file explicitly
	check whether parent dir exists before reporting ENOENT.
	* unix/select.c select: do not assume that fd_set pointers passed in
	actually point to full length structs when writing results.

Sat Dec 20 19:40:05 1997 CL0070
Nick Burrett  <nick.burrett@btinternet.com>

	* pwd/fgetpwentr.c: New file.
	* pwd/getpwuid_r.c: New file.
	* pwd/getpwnam_r.c: New file.
	* pwd/getpwent.c (getpwent_r): New function.
	* pwd/getlogin.c (getlogin): Use re-entrant pwd functions and store
	the login name statically.
	* termios/cuserid.c: New file.
	* clib/unistd.h (L_cuserid): Defined.
	* clib/pwd.h: Add re-entrant functions.

Wed Jan 28 21:05:00 1998 CL0069
Simon Callan <simon@callan.demon.co.uk>

	* clib/sys/sockio.h: Remove reference to <sys/iocomm.h>
	* netlib/socket.c: Remove reference to <sys/filio.h>
	* sys/vfork.c: Include <termios.h>, not <termio.h>

Mon Dec 08 00:59:31 1997 CL0068
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/assert.h: Allow multiple inclusion as required by the standard.

	* clib/ctype.h (isascii): Correct parentheses for operand precedence.

	* clib/netinet/in.h: Declare INADDR_NONE. Add some BSD protocols.
	Add declarations of standard well-known ports.
	(struct ip_opts): Declare.
	Include sys/byteorder.h.

	* netlib/ntop.c: Use __set_errno.

	* netlib/pton.c: Use __set_errno.
	(inet_pton4): Update to version 8.7 from Internet Software Consortium.

	* netlib/inet_aton.c: Use inet_pton.
	* netlib/inet_addr.c: Likewise.

	* sys/_syslib.s: Place _kernel_fpavailable back in C$$Code to fix
	assember errors with ObjASM 3.

	* sys/mman.c: Remove causes of 'use of = in a condition' warnings.
	Correct parentheses in usage of & and == in expressions.
	* time/time.c: Likewise.

	* unix/dirent.c (readdir_r): Do not write past the end of the d_name
	buffer. Increase cache for reading directories to 1K.

	* unix/ioctl.c: Remove #include <termio.h>.

Wed Dec 03 23:27:56 1997 CL0067
Nick Burrett  <nick.burrett@btinternet.com>

	* common/riscosify.c (sdirinit): Remove 'use of = in condition' warning.
	(sfixinit): Likewise.
	(sdirseg): Likewise.
	(__riscosify): Likewise.

	* unix/open.c (ttyname): Only return /dev/tty if fd is a terminal.

	* sys/_syslib.s (C$$data): Re-arrange and enforce a strict structure.
	(__main): Optimise for the new data structure arrangement.
	(__rt_stkovf_split_small): Likewise.
	(__rt_stkovf_split_big): Likewise.
	(error_table): New table
	(exit_with_error): Fix for ObjASM 3 bug. Pass an index into error_table.
	(NO_MEMORY): New define.
	(NO_CALLASWI): New define.
	(no_old_area, no_dynamic_area): Remove underscores for local names.
	(da_found, exit_word, dynamic_deletion): Likewise.
	(dynamic_area_name_end): Likewise.
	(_kernel_fpavailable): Place in its own AREA.
	* clib/sys/syslib.h (__main): Remove declaration.

	* clib/termios.h: Re-written.
	* clib/sys/ioctl.h: Integrate clib/sys/{fileio, sockio, iocomm}.h.
	* clib/sys/{fileio, sockio, iocomm}.h: Removed.
	* clib/termio.h: Display compiler error, if included.
	* clib/sgtty.h: New header file.
	* clib/stdio.h (L_ctermid): Define macro.
	(ctermid, cuserid): Remove enclosing #if 0
	* termios/{ctermid, cuserid, gtty, stty, tcdrain, tcflow}.c: New file.
	* termios/{tcflush, tcgetattr, tcgetpgrp, tcsendbrk}.c: New file.
	* termios/{tcsetattr, tcsetpgrp}.c: New file.
	* termcap.c: Include termios.h, not termio.h.

	* clib/sys/tty.h (tty): Use structure termios.
	Include termios.h, not termio.h.
	Include sys/ioctl.h.
	* unix/tty.c (everywhere): Support header file termios.h.
	Replace XTABS with OXTABS.
	(__ttyopen): Remove cc array. Use ttydefchars instead. Set __ispeed
	and __ospeed.
	(__ttyicanon): Don't recognise flag ONLRET.
	(__ttywrite): Don't recognise flag OLCUC.
	(__ttyinput): Don't recognise flag IUCLC.
	(__ttycr): Don't recognise flag OCRNL and ONOCR.
	(__ttyopen): Remove setting of c_line.
	* unix/unix.c. Use the header file termios.h.

	* unix/tty.c (__ttyioctl): Re-written, ready to provide more support
	for tty ioctls.
	(__ttyioctl, case TIOCEXCL): Do nothing.
	(__ttyioctl, case TIOCNXCL): Likewise.
	(__ttyioctl, case TIOCFLUSH): Flush input/output buffers.

	* unix/tty.c (__ttyiraw): Set variables iflag, oflag and lflag to type
	tcflag_t.
	(__ttyicanon): Likewise.
	(__ttywrite): Set variables oflag, lflag to type tcflag_t.
	(baud_map): New structure.
	(baud_rate): New array.
	(convert_baud_rate): New function.
	(__tty_423_sterm): Rename variable c to control.
	Make variable i type tcflag_t and rename to cflag.
	Remove array __ttybaud; use convert_baud_rate instead.
	(__ttyinput): Change argument iflag to type tcflag_t.
	(__ttyecho): Change arguments oflag and lflag to type tcflag_t.
	(__ttydel): Change argument lflag to type tcflag_t.
	(__ttytab): Change argument oflag to type tcflag_t.
	(__ttycr): Likewise.
	(__ttynl): Likewise.

	* clib/unixlib/types.h (__tcflag_t): Change type to unsigned long
	(__speed_t): New typedef.
	* clib/sys/types.h (speed_t): Define for __speed_t.

	* clib/unistd.h (_POSIX_{NO_TRUNC, VDISABLE, TIMERS}): Defined.
	(_POSIX_{REALTIME_SIGNALS, PII, PII_SOCKET, PII_INTERNET}): Defined.
	(_POSIX_{PII_INTERNET_STREAM, PII_INTERNET_DGRAM, POLL}): Defined.
	(_POSIX_SELECT): Defined.

	* clib/termcap.h: Correct prototype declarations.
	* termcap.c (tgetent): Fix prototypes according to termcap.h.
	(tgetnum, tgetflag, tgetstr, tputs): Likewise.
	(t_tgetid): Make argument const.
	(everywhere): Replace 0 with NULL when referring to pointers.
	Remove use of register.
	Remove causes of 'use of = in condition' warning.

	* sys/_os.s: Remove all uses of the macro NAME.

Wed Oct 29 10:43:50 1997 CL0066
Nick Burrett  <nick.burrett@btinternet.com>

	* wchar/mblen.c: New file.
	* wchar/mbstowcs.c: New file.
	* wchar/mbtowc.c: New file.
	* wchar/wcstombs.c: New file.
	* wchar/wctomb.c: New file.
	* clib/stdlib.h [0]: Allow prototypes for mblen, mbstowcs, mbtowc,
	wcstombs and wctomb to be declared.

	* unix/fnmatch.c: Remove some RCS/SCCS headers. Reformat for GNU
	coding standards.

Tue Oct 21 00:07:06 1997 CL0065
Nicholas Clark  <nickc@liv.ac.uk>

	* unix/dev.c (__pipeselect): Fix to use FD_SET (initial version passed
	int * rather than fd_set *)

Mon Oct 20 11:05:21 1997 CL0064
Nick Burrett  <nick.burrett@btinternet.com>

	* common/riscosify.c (__riscosify): Extra comments. Re-write of
	the code used to part discnames and environment variables.
	(can_csd): Removed.
	(dir_sep_kind): Removed.

	* unix/syslog.c: Fixes to allow a successful compilation.
	* clib/sys/syslog.h: Prevent multiple inclusion.
	(_PATH_LOG): Changed to /usr/syslog.
	(vsyslog): Use correct va_list prototype.

Sun Oct 19 13:59:14 1997 CL0063
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/local.h: Put __open and __close back in.
	Comment out __riscosify_std macro.
	* clib/sys/unix.h (struct sfile): Remove.

	* common/exist.c: Remove unnecessary #include's.
	Use _POSIX_PATH_MAX instead of MAXPATHLEN.
	(__isdir): Call __isdir_raw rather than os_file.
	(__object_exists): Likewise.
	* common/_exist.c: Use OS_File 17 rather than OS_File 5.
	* common/fdname.c: Remove causes of 'use of = in a condition' warnings.

	* unix/*.c: Remove causes of 'use of = in a condition' warnings.
	Use __set_errno. Use __riscosify_std instead of __riscosify.
	Remove '__' from argument types in .c files. Remove 'register'.
	Use meaningful variable names.
	Use _POSIX_PATH_MAX instead of MAXPATHLEN.
	Use os_* when already exists in preference to os_swi.
	Reduce #include's to those required (on some files).

	* unix/access.c: General tidy up as above.
	* unix/fcntl.c: Likewise.
	* unix/fnmatch.c: Likewise.
	* unix/fstat.c: Likewise.
	* unix/getenv.c: Likewise.
	* unix/gethostnam.c: Likewise.
	* unix/getopt.c: Likewise.
	* unix/glob.c: Likewise.
	* unix/isatty.c: Likewise.
	* unix/ispipe.c: Likewise.
	* unix/link.c: Likewise.
	* unix/lseek.c: Likewise.
	* unix/pipe.c: Likewise.
	* unix/select.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/sync.c: Likewise.
	* unix/sysconf.c: Likewise.
	* unix/truncate.c: Likewise.
	* unix/ulink.c: Likewise.

	* unix/chdir.c: Set ENOENT rather than EEXIST when directory does
	not exist.
	* unix/chmod.c (chmod): OS_File 17 instead of OS_File 5.
	(fchmod): Move into its own compilation unit.
	* unix/fchmod.c: New file.
	* unix/chown.c (fchown): Move into its own compilation unit.
	* unix/fchown.c: New file.

	* unix/dev.c: Restructure to remove most gotos.

	* unix/dirent.c: Define CACHE_SIZE. Loop on call to fill cache with
	OS_GBPB, since that can fail.

	* unix/dup2.c: Correct validation of FD2 argument.

	* unix/getcwd.c (unixify_path): New function.
	(getcwd): Use unixify_path to call __unixify.

	* unix/mkdir.c: OS_File 17 instead of OS_File 5.

	* unix/open.c (struct sfile): Moved here.

	* unix/pathconf.c (fpathconf): Convert FD to filename for call
	to pathconf.

	* unix/rmdir.c: Loop on OS_GBPB 9 as required by the PRM's.

	* unix/setenv.c (unsetenv): Re-adjust EP pointer when removing
	item from array.

	* unix/tty.c: (MAX_INPUT): #if used to check value is valid.
	(__ttyicanon): Swapped tty and file_desc argument position and callers.
	(__ttyiraw): Likewise.
	(__ttywrite): Remove unnecessary isupper.
	(__ttyinput): Likewise.

	* unix/unix.c: Ensure function names appear at start of line.
	(check_fd_redirection): Check fd < MAXFD.

	* unix/utime.c: OS_File 17 instead of OS_File 5.

	* unix/wait4.c (wait4): Check options against ~(WNOHANG|WUNTRACED).

Fri Oct 17 10:17:06 1997 CL0062
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/glob.h: Don't include <sys/stat.h> when compiled with GCC.

	* sys/syslib.c (_main): Remove call to ___do_global_ctors and __fptest.
	Use __[read,write]_environment_handler.
	* sys/syslib.s (___do_global_ctors): Remove.
	(__no_dynamic_area): Merge __fptest into here.
	(__fptest): Remove.
	(__read_environment_handler): Renamed from __rdenv.
	(__write_environment_handler): Renamed from __wrenv.
	(__rt_stkovf_split_small): Call __unixlib_raise_signal directly.
	(__rt_stkovf_split_big): Likewise.
	* sys/exec.c: (__exret): Use __write_environment_handler.
	* clib/sys/syslib.h (__fptest): Remove declaration.
	(___do_global_ctors): Remove declaration.
	(__read_environment_handler): Renamed from __rdenv.
	(__write_environment_handler): Renamed from __wrenv.
	* signal/coredump.c (__backtrace): Use __write_environment_handler.

Tue Oct 14 11:18:13 1997 CL0061
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h: Added 2 new riscosify flags
	* riscosify.c __riscosify(): now check for dir present. os_file 17
	before creating dir. more comments

Tue Oct 14 23:36:35 1997 CL0060
Nick Burrett  <nick.burrett@btinternet.com>

	* atexit.c (__atexit_function_array): Renamed from __ax.
	(__atexit_function_count): Renamed from __axcnt.
	(__MAX_ATEXIT_FUNCTION_COUNT): Renamed from __MAX_AXCNT.
	* clib/stdlib.h: Likewise.
	* sys/syslib.c: Likewise.
	(_main): Setup the signal names and resource limits as early as
	possible.
	Do not initialise the signal handlers here.
	* signal/init.c (__unixlib_signal_initialise): Do not setup the
	signal names here.

	* bsearch.c (bsearch): Use more meaningful variable names.

	* unix/unix.c (convert_command_line): Don't decrement argc when
	we terminate the argv list.
	(__unixinit): Initialise the signal handlers immediately after
	the process structure has been created.

	* unix/stat.c (lstat): Move into its own compilation unit.
	(fstat): Likewise.
	(__stat): Likewise.
	* unix/lstat.c: New file.
	* unix/fstat.c: New file.
	* common/stat.c: New file.
	* clib/sys/stat.h (__stat): Declare.

Tue Oct 14 17:01:00 1997 CL0059
Nick Burrett  <nick.burrett@btinternet.com>

	* Docs/Changelog: Add entries CL0001 to CL0030
	* Doc/CL0000049/*: delete

Mon Oct 13 00:07:23 1997 CL0058
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unistd.h: Use __nbytes rather than __n in prototype or write.

	* clib/sys/uio.h: Update prototypes for readv, writev to use __ssize_t.

	* unix/read.c: Added quick exit for nbytes == 0. Use ssize_t rather
	than __ssize_t and removed unnecessary type conversions to ssize_t.
	* unix/write.c: Likewise.

	* unix/readv.c: Use ssize_t instead of int. Check iov_len before
	calling device read function. Return byte count if fail after first
	read. Set errno to EINVAL if count is <= 0.
	* unix/writev.c: Likewise. Also increment process's output count.

Sun Oct 12 11:58:29 1997 CL0057
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/netinet/ip.h (struct ip): Use bitfields to ensure structure
	layout is correct with ARM C compiler in ANSI mode.
	(struct ip_timestamp): Likewise.
	* clib/netinet/ip_var.h (struct ipasfrag): Likewise.
	* clib/netinet/tcp.h (struct tcphdr): Likewise.

Sat Oct 11 01:00:00 1997 CL0056
Simon Callan  <simon@callan.demon.co.uk>

	* sys/_jmp.s: restore file that got deleted.

Thu Oct 09 16:05:58 1997 CL0055
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c (__unixlib_fatal, __badr): Add the noreturn attribute
	to the function definition.
	[__badr, __unixlib_fatal]: Don't define for __GNUC__.
	(check_for_io_redirection): Recogise the [fd]> redirection construct.
	Call __open to open the file descriptor.
	(verify_redirection): Likewise.
	(get_fd_redirection): New function.
	(convert_command_line): Check *cli != NULL on the 2nd while loop.

	* unix/open.c (__open): Move code to open a file for a file descriptor
	to here.
	(open): Call __open.
	(__sfile): Make static.
	* unix/close.c (__close): Move code to perform the file descriptor
	closing to here.
	(close): Call __close.
	* unix/reopen.c (__reopen): Delete common code shared with close/open
	and call __close/__open instead.
	* clib/unixlib/local.h (__open, __close): Declare.
	* clib/sys/unix.h (__sfile): Remove

	* unix/pselect.c: New file.
	* unix/poll.c: New file.
	* clib/sys/select.h (pselect): Declare.
	* clib/sys/poll.h: New file

Thu Oct 09 20:08:48 1997 CL0054
Simon Callan  <simon@callan.demon.co.uk>

	* all files: remove all RCS log entries.

Mon Oct 06 22:36:06 1997 CL0053
Nicholas Clark  <nickc@liv.ac.uk>

	* netlib/_net_error.s: preserve ip across call to __seterr

Sat Sep 20 09:53:25 1997 CL0052
Nicholas Clark  <nickc@liv.ac.uk>

	* strlen.c: Rewrite to optimise loop by 1 ARM instruction (3 not 4)

Mon Sep 29 23:56:40 1997 CL0052
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/sys/tty.h: Add 1 character lookahead buffer
	* clib/sys/dev.h: add __select function entry to dev table
	relevant function prototypes wrapped with __UNIXLIB_NO_COMMON_DEV
	changed all dev table functions to pass unixlib_fd pointer as 1st arg
	tidied and added __ to dummy argument names

	* unix/tty.c: Use lookahead buffer to implement __ttyselect
	__ttyicanon and __ttyiraw check lookahead, __ttylseek not compiled
	unless __UNIXLIB_NO_COMMON_DEV

	* unix/close.c: use __set_errno. more debugging info

	* unix/dev.c: relevant functions wrapped with __UNIXLIB_NO_COMMON_DEV
	added __*select, changed functions to pass unixlib_fd as 1st arg

	* unix/open.c,
	* unix/pipe.c: changed to call with unixlib_fd as 1st arg

	* unix/ioctl.c,
	* unix/lseek.c,
	* unix/read.c,
	* unix/readv.c,
	* unix/reopen.c,
	* unix/write.c,
	* unix/writev.c: changed to call with unixlib_fd as 1st arg
	use __set_errno

	* netlib/accept.c: set _FDMAGIC on accepted socket's fd

	* sys/select.h: remove const from select prototype
	* netlib/select.c: renamed as unix/select.c
	* unix/select.c: major re-write. Copes with all DEVs. Retruns FD_SETs of
	live fds. Subtracts time waited from timeout passed

	* signal/coredump.c __backtrace: Give register dump when PC is invalid

Mon Oct 06 20:20:30 1997 CL0051
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c (check_for_io_redirection): Cope with spaces appearing
	after a redirection chevron.
	(verify_redirection): Likewise.
	(convert_command_line): Likewise.

Sat Oct 04 16:05:23 1997 CL0050
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c: (initalise_process_structure): Renamed from
	__initialise_proc.
	Rename process variable 'u' to 'process'.
	Increase the regs array from 3 to 10.
	(__unixinit): Re-write and split into many functions.
	(create_process_structure): New function.
	(initialise_unix_io): New function.
	(check_fd_redirection): New function.
	(find_terminator): New function.
	(check_for_io_redirection): New function.
	(verify_redirection): New function.
	(find_redirection_type): New function.
	(convert_command_line): New function.

	* sys/exec.c (execl, execle, execlp, execv, execvp): Move into
	their own separate compilation units.
	(execve): Cosmetic changes, make variable names more descriptive.
	* sys/execl.c: New file.
	* sys/execle.c: New file.
	* sys/execlp.c: New file.
	* sys/execv.c: New file.
	* sys/execvp.c: New file.

Sat Oct 04 23:36:26 1997 CL0049
Nicholas Clark  <nickc@liv.ac.uk>

	* common/riscosify.c (__riscosify): Ensure "." returns "@"
	Do create directories unless they exist already. (not don't!)
	(sdirinit) don't lose last char from names when adding '.'

Sat Sep 20 09:53:25 1997 CL0048
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/asm_dec.s: Added NetSWIsimple macro
	Update NetSWI to call __net_error before changing out of SVC

	* netlib/_net_error.s: Added  __net_error_simple_entry
	* netlib/*.s
	  Files with 1-4 args which call NetSWI: Replaced with NetSWIsimple
	  Other files which call NetSWI: remove BLVS __net_error
	netlib/_shutdown.s,
	netlib/_listen.s,
	netlib/_ioctl.s,
	netlib/_getsockname.s,
	netlib/_getpeername.s,
	netlib/_connect.s,
	netlib/_close.s,
	netlib/_bind.s:
	  NetSWIsimple0 - ie don't rely on R0 being uncorrupted.
	netlib/_getsockopt.s:
	netlib/_setsockopt.s:
	  NetSWI0 - ie don't rely on R0 being uncorrupted.
	netlib/_select.s: Work around bug in Internet 5.02

Sat Oct 04 19:40:02 1997 CL0047
Nicholas Clark  <nickc@liv.ac.uk>

	* common/riscosify.c (__riscosify): Ensure "." returns "@"
	(sdirinit) don't lose last char from names when adding '.'

Thu Oct 02 11:53:21 1997 CL0046
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/dirent.h (struct __dir_stream): Correct spelling of gbpb_off
	field and change type to remove compiler warning.

	* clib/sys/unix.h: Remove struct sdir. Correct indentation.

	* clib/unixlib/local.h: Change __RISCOSIFY_* from enum. Declare
	__riscosify_init. Conditionalise out __sfixfind. New macro
	__RISCOSIFY_TRUNCATE_VALUE replaces separate mask and shift.

	* common/riscosify.c (__riscosify_init): New function.
	(__sdirinit): Moved from unix.c and rewritten to make it easy to add
	default mappings for Unix directories to RISC OS directories.
	(size_t truncate[]): Removed reference to the devil himself.
	(sdirseg): Changed return value to enum sdirseg_result. Move '.'
	termination of translation to sdirinit.
	(__riscosify): Style. Correct os_file (8) call. Allow '_' in
	pathnames. Various bug fixes

	* common/uname.c: __uname moved back here from riscosify.c.

	* common/unixify.c (__unixify): Free buffer if it overflows.
	Keep symmetric with __riscosify.

	* sys/exec.c: Merge recent changes from Nick B and Nick C.
	* sys/syslib.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/stat.c: Likewise.

	* unix/unix.c: (__unixinit): Tidied up redirection processing and added
	support for [n]<> file and more comments.
	(__panic): Removed. (__badr): Reinstated. Simulated 'noreturn' on
	__badr and local use of __unixlib_fatal from within __unixinit since
	it reduces code size.
	(__sdirinit): Moved with suffix initialisation code to
	common/riscosify.c.

Fri Sep 19 13:40:41 1997 CL0045
Nick Burrett  <nick.burrett@btinternet.com>

	* common/unixify.c: #include <errno.h>
	* clib/sys/unix.h (__sfix): Remove definition.
	* clib/unixlib/local.h: Move #include <stddef.h> outside of
	__UNIXLIB_INTERNALS check. General tidy-up.
	* clib/unixlib/math.h: Don't #include <machine/endian.h>.
	* sys/_exec.s (__exec_rtn_corrupt): Call abort() instead of raise().
	* sys/_alloca.s (__builtin_alloca): Do not define.

	* unix/stat.c (__stat): Remove #ifdef DEV_SOCKET
	* unix/dev.c (__dev): Likewise.


Thu Sep 18 23:40:22 1997 CL0044
Nicholas Clark  <nickc@liv.ac.uk>

	* sys/exec.c execve: Changed processing of execname[0] == '*' so that
	it removes '*' and ' ' characters from child argb.

	* clib/unixlib/asm_dec.s: Corrected macro NetSWI to load errno before
	exiting SVC mode.

	* netlib/s/_net_error: Removed code to load errno

Thu Sep 18 17:29:38 1997 CL0043
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdlib.h: Annotated. Don't #include <errno.h>.
	* unix/getenv.c: #include <errno.h>.
	* unix/dirent.c: #include <errno.h>. Remove Alun Jones comment.
	* stdio/newstream.c: #include <errno.h>.
	(__getmode): Set errno with __set_errno.
	* stdio/getdelim.c: #include <errno.h>.
	(getdelim): Set errno with __set_errno.
	* stdio/fwrite.c: #include <errno.h>.
	(fwrite): Set errno with __set_errno.
	* stdio/fread.c: #include <errno.h>.
	* stdio/flsbuf.c: #include <errno.h>.
	(__flsbuf): Set errno with __set_errno.  Include Nick Clark's change
	to prevent a write operation of zero bytes.
	* stdio/filbuf.c: #include <errno.h>.
	* stdio/fclose.c: #include <errno.h>.
	(fclose): Set errno with __set_errno.
	* system.c: #include <errno.h>.
	(system): Set errno with __set_errno.

	* clib/assert.h (__fail): Delete
	(__assert_fail): Declare prototype.
	(assert): Fix to reflect above. Define a GCC specific version.
	* assert.c (__fail): Delete.
	(__assert_fail): New function.

	* clib/dirent.h (__dir_stream): Make __magic an unsigned int.
	(DIRSIZ): Remove

	* clib/sys/syslib.h (handler): Replace one character variable names
	with something more appropriate.
	(env): Likewise. Use a macro to define number of handlers.
	(__ENVIRONMENT_HANDLERS): Define
	(__Oenv): Rename to __calling_environment.
	(__Cenv): Rename to __c_environment.
	(__restore_calling_environment_handlers): Declare prototype.
	* sys/syslib.c (everywhere): Reflect changes made to syslib.h.
	(__c_environment): Declare a handler for UpCall.
	(__restore_calling_environment_handlers): New function
	(_main): Use long local variable names.
	(exit): Likewise.
	(_exit): Likewise.
	(__reset): Likewise. Call __restore_calling_environment_handlers.
	* signal/coredump.c (__backtrace): Reflect changes made to syslib.h.
	* signal/_signal.s (__h_upcall): New function
	* clib/unixlib/sigstate.h (__h_upcall): Declare prototype.
	* sys/exec.c (execve): Call __restore_calling_environment_handlers
	(__exret): Reflect changes made to syslib.h

	* sys/os.c (__seterr_): Remove
	* clib/sys/os.h (__seterr_): Remove prototype.
	(OS_E*): Removed macros.

Thu Sep 18 11:04:20 1997 CL0042
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h: 	define __filename_to_riscos();
	  defined constants for flags
	  arrange __UNIXLIB_OLD_UNAME when defined to cause compliation of
	  "traditional" __uname() emulation, otherwise ensure compile time
	  errors for __uname()

	* common/uname.c: deleted

	* common/unixify.c: new file - __unixify()

	* common/riscosify.c: new file - __riscosify() and special suffix
	routines

	* unix/dirent.c: __uname() -> __riscosify(), use filename character
	conversion table to convert '/', '#' found in filenames

	* unix/getcwd.c: use filename character conversion table
	use new __unixify() function rather than static function to convert path

	* unix/unix.c: 	call __sfixinit() in riscosify() to initialise special
	suffix list

	* common/exist.s: __uname() -> __riscosify(), convert non "raw"
	functions to C

	* common/exist.c: __file_exitsts(), __object_exists() now in C

	* common/serial.c: __uname() -> __riscosify(), save inline strcpy

	* stdio/rename.c: __uname() -> __riscosify() twice, save two strcpy
	I've used __set_errno(ENAMETOOLONG) is this acceptable for rename() ?

	* sys/syslib.c		remove reference to __uname_dont_pack_ptr
	currently default is not to truncate at all, and not to drop vowels

	* unix/chdir.c:	__uname() -> __riscosify(), save strlen

	* unix/chmod.c: __uname() -> __riscosify()

	* unix/dev.c: __uname() -> __riscosify()

	* sys/exec.c: __uname() -> __riscosify(), save strlen

	* unix/mkdir.c: __uname() -> __riscosify(), replaced assignment to errno
	with __set_errno

	* unix/open.c: comment about __uname() updated

	* unix/rmdir.c:	__uname() -> __riscosify(), replaced assignment to errno
	  with __set_errno

	* unix/stat.c: __uname() -> __riscosify()

	* unix/truncate.c: __uname() -> __riscosify(), replaced assignment to
	errno with __set_errno

	* unix/unlink.c: __uname() -> __riscosify(), replaced assignment to
	errno with __set_errno

	* unix/utime.c: __uname() -> __riscosify(), replaced assignment to errno
	with __set_errno

Wed Sep 17 07:34:04 1997 CL0041
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* alloc.c (malloc_stats): Re-enabled for -DDEBUG.
	(malloc, realloc, memalign): Check that malloc size has not wrapped
	around after rounding.

	* unix/stat.c (__stat): Constrain stat.st_size for directories to
	be in [0,32768] to overcome image FS problems.

Mon Sep 15 16:02:28 1997 CL0040
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_jmp.s (sigsetjmp, siglongjmp): Remove
	* sys/_sigjmp.s: Move sigsetjmp and siglongjmp here.

	* locale/ctypetable.c (__build_ctype_tables): Define
	* clib/locale.h (__build_ctype_tables): Declare.
	* locale/locale.c (build_ctype_tables): Move to ctypetable.c
	(__locale_territory): Remove declaration.
	(setlocale): Call __build_ctype_tables.
	* locale/territory.c (__locale_territory): New file and declare.
	* sys/syslib.c (_main): Replace setlocale with __build_ctype_tables.
	(_exit): Don't store the time that the process was executing for.

	* ctype.c (toascii, tolower, toupper, isascii, isalnum, isalpha,
	iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace,
	isupper, isxdigit): Move to ctypeproc.c
	* ctypeproc.c: New file.

	* locale/localeconv.c (read_byte_list): Use OS_BinaryToDecimal to
	convert numbers to strings.

	* unix/proc.c (getegid, geteuid, getgid, getpgrp, getpid, getppid,
	getuid, seteuid, setgid, setpgid, setpgrp, setuid): Move functions
	into their own compilation units
	* resource/getegid.c: New file
	* resource/geteuid.c: New file
	* resource/getgid.c: New file
	* resource/getpgrp.c: New file
	* resource/getpid.c: New file
	* resource/getppid.c: New file
	* resource/getuid.c: New file
	* resource/seteuid.c: New file
	* resource/setgid.c: New file
	* resource/setpgid.c: New file
	* resource/setpgrp.c: New file
	* resource/setuid.c: New file

Mon Sep 15 01:30:55 1997 CL0039
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/asm_dec.s (XOS_SetVarVal): Corrected.
	(EOPPNOTSUP, FIOSLEEPTW): Removed.

	* stdio/setbuf.c (do_buffer): Keep iobuf struct consistent even on
	malloc failure.

	* sys/exec.c (set_dde_cli): New function.
	(execve): Use set_dde_cli. Deinstall handlers after point of no return.

	* sys/_kgetenv.s: Pass (size-1) to XOS_ReadVarVal instead of size to
	leave room for the terminator. Save error around call to __seterr.

	* sys/_ksetenv.s: Handle incoming value == NULL. Save error around
	call to __seterr.

	* sys/_kosargs.s: Save one instruction.
	* sys/_kosbget.s: Set return value on error.
	* sys/_kosbput.s: Return -2, not -1, on error.
	* sys/_kosbyte.s: Correct formation of return value from r1,r2 and C.
	* sys/_koscli.s: Return 1 on success.
	* sys/_kosfile.s: Return -2, not -1, on error.
	* sys/_kosrdch.s: Check for error and set return appropriately.
	* sys/_koswrch.s: Likewise.

Sun Sep 14 18:07:50 1997 CL0038
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/unixlib/asm_dec.s: Place vertical bars around __set_errno
	* netlib/_net_error.s: Likewise.

Sun Sep 14 15:45:43 1997 CL0037
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/asm_dec.s: Added NetSWI macro.

	* netlib/*.s: Rename macro CallSWI to NetSWI. Call __net_error on error.

	* netlib/_net_error: New file.

	* netlib/_socket.s: Do not explicitly set FIOSLEEPTW in assembly,
	now done in netlib/socket.c if running in a task window.

	* netlib/socket.c: Set FIOSLEEPTW on sockets when running in a task
	window.

Sun Sep 14 17:31:13 1997 CL0036
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/kernel.h (_kernel_swi_c, _kernel_osbyte, _kernel_osrdch,
	_kernel_oswrch, _kernel_osbget, _kernel_osbput, _kernel_osgbpb,
	_kernel_osword, _kernel_osfind, _kernel_osargs, _kernel_oscli,
	_kernel_getenv, _kernel_setenv): Declare

	* unixlib/asm_dec.s (ExitSVC): Replace 1<<28 with 1:SHL:28.
	(XOS_BGet, XOS_BPut, XOS_SetEnv, XOS_SetVarVal): Define

	* sys/_kernel.s (_kernel_osfile): Moved function to sys/_kosfile.s
	* sys/_kosfile.s: New file
	* sys/_koswrch.s: New file
	* sys/_kosrdch.s: New file
	* sys/_kosbyte.s: New file
	* sys/_kosbget.s: New file
	* sys/_kosbput.s: New file
	* sys/_kswi_c.s: New file
	* sys/_kgetenv.s: New file
	* sys/_kosargs.s: New file
	* sys/_koscli.s: New file
	* sys/_kosfind.s: New file
	* sys/_kosgbpb.s: New file
	* sys/_ksetenv.s: New file

	* objs/Makefile: Add support for compiling with GCC, assembling with
	'as' and making the library with 'makealf'.
	(CCflags): Remove '-fw' switch for Norcroft C
	(ARflags): Add switch '-c'
	(UnixLib): Remove switch '-c'

Wed Sep 10 18:09:16 1997 CL0035
Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/setbuf.c: Reduce code duplication. Used __set_errno.

	* clib/unixlib/types.h: Rename __uint*_t types to __u_int*_t

	* clib/sys/unix.h: Make __magic unsigned.
	* clib/stdio.h: Make __magic unsigned. Fixed all prototypes with a
	double underscore.

Tue Sep 09 17:37:51 1997 CL0034
Nicholas Clark  <nickc@liv.ac.uk>

	* netlib/*.s: Used Stewart Brodies SWI veneer to ensure all sockets
	are called in SVC mode [Stewart says that some versions of Acorn's stack
	go horribly wrong otherwise]

	* stdio/flsbuf.c: Flushing a stream with no characters buffered
	pending a write now does not perform a write() of 0. [consistent with
	BSD, can avoid problems with unconnected sockets]

	* sys/exec.c: Remove DDE Utils extended command line on OSCLI failure
	* sys/_exec.s: Remove DDE Utils extended command line on OSCLI failure

	* clib/unixlib/asm_dec.s: Added Stewarts SVC swi veneers and DDE SWI


Tue Sep 02 15:55:49 1997 CL0033
Nick Burrett  <nick.burrett@btinternet.com>

	* math/erf.c: New file. Implements erf() and erfc().
	* math/j0.c: New file. Bessel functions j0() and y0().
	* math/j1.c: New file. Bessel functions j1() and y1().
	* math/jn.c: New file. Bessel functions jn() and yn().
	* math/k_cos.c: New file. Internal function __kernel_cos().
	* math/k_rem_pio2.c: New file. Internal func. __kernel_rem_pio2().
	* math/k_sin.c: New file. Internal function __kernel_sin().
	* math/lgamma.c: New file. Gamma functions gamma() and lgamma().
	* math/lgamma_r.c: New file. Gamma function lgamma_r().
	* math/logb.c: New file. Function logb().
	* math/rem_pio2.c: New file. Function rem_pio2().
	* clib/math.h: Declare prototypes for the above

	* signal/post.c (__unixlib_internal_post_signal): Optimise the
	default signal action check.

Fri Sep 05 1997 CL0032
Simon Callan <simon@callan.demon.co.uk>

	* Backout the __uname() / __riscosify() changes, as they are not
	yet ready for release.

Thu Aug 07 00:17:12 1997 CL0030
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* sys/mman.c: (mmap): Set errno to ENOSYS when no dynamic areas rather
	than ENOMEM.

Wed Aug 06 20:35:48 1997 CL0029
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h (__filename_to_riscos): Define.
	(__RISCOSIFY*): Define.
	(__UNIXLIB_OLD_UNAME): Define.

	* common/riscosname.c (__filename_to_riscos): New function.

	* unix/dirent.c: Use filename character conversion table in
	common/riscosname.c to convert '/' found in filenames
	* unix/getcwd.c: Likewise.
	* unix/unix.c: Call __sfixinit().

	* common/exist.s (__file_exists): Remove.
	(__object_exists): Remove.
	* common/exist.c (__file_exitsts): New function.
	(__object_exists): New function.

	* common/serial.c: Use __filename_to_riscos instead of __uname.
	* stdio/rename.c: Likewise.
	* unix/chdir.c: Likewise.
	* unix/chmod.c: Likewise.
	* unix/dev.c: Likewise.
	* sys/exec.c: Likewise.
	* unix/open.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/mkdir.c: Likewise. Use __set_errno.
	* unix/rmdir.c: Likewise.
	* unix/truncate.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Likewise.

	* sys/syslib.c (__uname_dont_pack_ptr): Remove.

Sun Aug 03 18:34:24 1997 CL0027
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/signal.h: Correct macros for sigaddset, sigdelset, sigismember
	and put them inside a __UNIXLIB_INTERNALS. These macros are not really
	for the user, especially since they do not do any argument checking.

	* clib/stdlib.h: Declare setenv, unsetenv and clearenv.

	* clib/sys/unix.h: Add envp and envb to Unix proc struct. These are
	temporary until the UnixLibSupport module is ready. They are used to
	pass the current environ to a child process. Remove declaration of
	defunct __permstr. Declare __decstrtoui, __last_environ,
	__UNIX_ENV_PREFIX and environment support functions.

	* stdio/popen.c: (pclose): Return status from wait not return value of
	wait. Do not close stream->fd directly in pclose, let fclose do it.

	* sys/exec.c: (execve): Copy current environ into proc struct for
	child process to collect. Check result of realloc before storing so
	memory leak is avoided. Reorganisation to move calculation of
	__codeshift and __exshift later in function so that malloc_trim can
	be called safely. Fix store beyond end of buffer when argv[0] is NULL,
	i.e., when called from system with execl (line, 0).

	* sys/syslib.c: (_exit): Do not set Sys$ReturnCode since __exit does it.

	* sys/vfork.c: Initialisation and freeing of child's envp and envb.
	Use monotonic clock to generate process id (this will change).

	* unix/chdir.c: Rewritten to use and change Prefix$Dir when it has
	been set. Use new __getenv_from_os.

	* unix/getcwd.c: Complete rewrite to reduce code size and make clearer.
	Check Prefix$Dir first since OS_File calls are intercepted by DDEUtils.
	Use new __getenv_from_os. Remove possible memory errors.

	* unix/getenv.c: Complete rewrite. Use __UNIX_ENV_PREFIX when
	environment names interact with global RISC OS environment. Support
	for new setenv, clearenv and unsetenv functions. Remove need for static
	__envcnt and __envsize variables. __intenv now only checks RISC OS
	environment. Allow for environ to have been allocated in parent process.

	* unix/pipe.c: Change call to __intenv and __permstr.

	* unix/putenv.c: Rewritten to not modify argument and allow NAME to be
	removed from the environment. Use setenv to add and unsetenv to remove.

	* unix/setenv.c: New file to provide setenv, unsetenv and clearenv.

	* unix/unix.c: Add default value for UnixFS$/pipe to use Wimp$ScrapDir,
	needed for cases when programs use pipes but do not set UnixFS$/pipe.
	Remove __permstr and use strdup instead. Make __decstrtoui external
	and check END argument before writing to it. Collect environment from
	parent process if we are a child. Use monotonic clock to generate
	process id (this will change).

Sun Aug 03 15:45:24 1997 CL0025
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/signal.h (sigaddset, sigdelset, sigismember): Fix typos

	* signal/_signal.s (__h_error): Fix LDM typo that would otherwise
	cause an Address Exception if raise ever returned.

	* unix/getsubopt.c: Re-written.

Sun Aug 03 14:42:53 1997 CL0028
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/local.h: Arguments to __address_valid are now const.

	* locale/localeconv.c: (read_byte_list): Converted sprintf call into
	inline code and check buffer does not overflow.

	* unix/uname.c: Extract module version from help string instead of
	using OS_Module 20 since that does not work on ROMPatches which is
	not a ROM module.

Sat Aug 02 17:13:24 1997 CL0024
Nick Burrett  <nick.burrett@btinternet.com>

	* time/broken.c: fix off-by-one error with tm_mon.

	* time/tzset.c: don't overwrite the tzname string constants.

	* time/settod.c: remove some comments

	* clib/signal.h: Define macro versions of sigaddset, sigdelset,
	sigismember. Prefix all variable names with '__'.

	* signal/sigismember.c: #undef sigismember
	* signal/sigdelset.c: #undef sigdelset
	* signal/sigaddset.c: #undef sigdelset
	* signal/sigsets.c: #undef sigemptyset, sigfillset, sigmask

	* signal/post.c, signal/signal.c, signal/sigprocmsk.c: Remove
	inline_sigfuncs and code associated with it.

	* clib/netdb.h: re-written

	* clib/socketlib.h: removed
	* clib/unixlib/local.h: declare __net_readline

	* netlib/readline.c (__socketlib_readline): remove static buffer
	and redeclare as __net_readline.

	* netlib/host.c (__gethostent): use __net_readline
	* netlib/net.c (__getnetent): use __net_readline
	* netlib/proto.c (__getprotoent): use __net_readline
	* netlib/serv.c (__getservent): use __net_readline

	* netlib/h_errno.c: new file

Sat Aug 02 12:54:29 1997 CL0023
Nick Burrett  <nick.burrett@btinternet.com>

	* locale/setlocale.c (territory_number): If locale is empty,
	use default locale and not the C locale.
	(build_ctype_tables): top-bit set chars are undefined for C locale.
	(setlocale): Preserve old locale if new locale is invalid.
	Invalidate lconv structure.

	* locale/localeconv.c (read_number): removed
	(read_symbol): return int, not void *
	(localeconv): Cache lconv structure. Replace read_number calls
	with read_symbol.
	(read_byte_list): Replace strcat with stpcpy.

	* clib/locale.h: Declare __setlocale_called for lconv structure
	caching.

Fri Aug 01 20:22:01 1997 CL0022
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/sys/utsname.h: New header

	* unix/uname.c: uname() function for <sys/utsname.h>

	* unix/glob.c: don't explicitly set errno to zero

	* clib/unixlib/types.h: more exact definitions of  __int8_t,
	__int16_t etc. for GCC.

	* strtol.c: remove strtoul(). Use __set_errno

	* strtoul.c: define strtoul()

	* strspn.c, stpcpy.c, strcat.c, strchr.c, strcmp.c, strcpy.c,
	strichr.c, stricmp.c: move functions into their own separate
	compilation units

	* strcspn.c, strpbrk.c, stpncpy.c, strncat.c, strrchr.c, index.c,
	strncmp.c, strncpy.c, strrichr.c, strnicmp.c: new files

Thu Jul 31 23:52:21 1997 CL0026
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* strdup.c: Replace use of __permstr with malloc and memcpy.

	* clib/unixlib/local.h: Comment out __UNIXLIB_INTERNALS after #endif.

	* locale/localeconv.c: (read_byte_list): Free memory if realloc fails.
	(localeconv): Only need to malloc 1 character for null string. Do not
	set errno to ENOMEM, since malloc does that already.

	* locale/setlocale.c: (setlocale): Use (void) on __set_errno to stop
	compiler warnings.

	* stdio/remove.c: Remove need for stdio to be pulled in.

	* time/calendconv.c: Comment out #define DEBUG.

	* unix/tty.c: Remove setting of errno to ENOMEM, since malloc does
	that already.

Mon Jul 28 21:57:20 1997 CL0021
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/string.h: Removed #ifdef 0 from strxfrm and strcol

	* locale/setlocale.c: setlocale(,"") equivalent to setlocale(,"C").
	  comment in perl source:

	  Ultrix setlocale(..., "") fails if there are no environment
	  variables from which to get a locale name.

	  implication: most Unixes accept "" without complaint.

	* clib/unixlib/local.h: __attribute to __attrib

	* time/c.calendconv: Fixed 3 off-by-ones in __tz
	  Check the SWI with Mon 1st Jan 1900.

	* time/c.gmtime: gmtoff == 0 whether localtime on daylight saving!

Sat Jul 26 17:03:30 1997 CL0019
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/syslib.c: Call setlocale() to initialise ctype tables

	* locale/setlocale.c: Re-build ctype tables for category LC_ALL.

	* locale/localeconv.c: Perform malloc memory check and prevent
	memory leak.

Sat Jul 26 13:30:25 1997 CL0020
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* All changed files: More meaningful variable names, use of __set_errno
	and '__' added to function argument names in header files.

	* clib/unistd.h: Add declaration of getdomainname and setdomainname.

	* clib/sys/select.h: Add declaration of _select.

	* clib/unixlib/types.h: Remove __ptr_t from __FD_ZERO. Use unsigned
	number in __FDMASK.

	* netlib/select.c: New file to interface select to underlying
	Socket_Select SWI. Converts fd's and fd_set's from UnixLib fd's
	to underlying Socket fd's.

	* sys/debug.c: Check file is a RISC OS device before printing name.

	* unix/getdomain.c: New file. Provides getdomainname and setdomainname.
	getdomainname tries Inet$LocalDomain and Inet$HostName.

	* unix/gethostnam.c: Fixed off-by-one errors with length checks.
	Returned name is not zero terminated when ENAMETOOLONG occurs.

Sat Jul 26 12:56:12 1997 CL0018
Nick Burrett  <nick.burrett@btinternet.com>

	* signal/kill.c, signal/coredump.c, signal/post.c,
	signal/raise.c, signal/setup.c, signal/sigprocmsk.c,
	sys/sigsetjmp.c: remove support for sigcode and sigerror

	* signal/post.c: inline all signal functions if inline_sigfuncs
	is defined. Remove all traces of pre-emptive signal handling.

	* signal/init.c: remove pre-emptive signal handling support.
	Fix an error message typo.

	* signal/signal.c: inline sigemptyset() if inline_sigfuncs is
	defined.

	* signal/sigpreempt.c: deleted

	* signal/sigprocmsk.c: inline sigismember() and sigdelset() if
	inline_sigfuncs is defined.

	* clib/unixlib/sigstate.h: remove pre-emptive signal handling
	support. Remove support for sigcode and sigerror. Minor cosmetic
	changes.

Thu Jul 24 00:01:33 1997 CL0017
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* All changed files: More meaningful variable names, use of __set_errno
	and '__' added to function argument names in header files.

	* clib/dirent.h: Declare readdir_r and add dirent field to DIR struct
	to hold the last value returned from readdir.

	* clib/stdio.h: Changed __STDIOLIB__ so each file only uses one word
	in pulling in __stdioinit rather than a full function.

	* clib/unixlib/local.h: Declare __fd_to_name to return the RISC OS
	filename corresponding to an open RISC OS file descriptor. Moved all
	bar __uname_control stuff inside __UNIXLIB_INTERNALS.

	* common/fdname.c: New file for __fd_to_name.

	* common/serial.c: Modified __get_file_ino so __uname is only performed
	when DIRECTORY is not NULL (as called from readdir). Fixed DIRECTORY
	and NAME concatenation to not overrun the internal buffer.

	* sys/debug.c: Only print active file descriptor and now print the
	filename corresponding to them.

	* unix/chmod.c: Return EPERM on protection change error rather than
	RISC OS error. Use __fd_to_name in fchmod. Return more Unix errors
	where appropriate when RISC OS error occurs.

	* unix/dev.c: (__fsopen): Open the file before setting protection
	bits on a newly created file. This allows RCS lock files to be
	created open for writing with permission 444 (r--r--r--).
	(__fsclose): Use __fd_to_name.

	* unix/dirent.c: New readdir_r function for POSIX. readdir function
	now reentrant for different DIR streams by using a buffer allocated
	on demand in the DIR stream and uses readdir_r function.

	* unix/stat.c: (fstat): Use __fd_to_name. Return more Unix errors
	where appropriate when RISC OS error occurs.

Wed Jul 23 22:27:56 1997 CL0016
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/sys/syslib.h: remove __noreturn__ attribute from __funcall_error

	* signal/sigprocmsk.c: declare mask as sigset_t rather than
	unsigned int.

	* stdio/freopen.c: reset input pointer (i_ptr), eof (__eof) and
	pushedback indicator.

	* stdio/rename.c: remove need for stdio to be pulled in. Call __uname
	on new file with the create directory flag set. This allows
	rename ("foo", "foo.c") to create the "c" directory if needed.

	* sys/syslib.c: remove double initialisation of __uname_control.

	* sys/_sdiv10.s: correct spelling of sdiv10 functions.

Tue Jul 22 00:00:00 1997 CL0015
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/ctype.h: Rewrite for compatibility with the structures
	returned by the Territory manager.
	(_tolower, _toupper): Remove.
	* ctype.c: Reflect changes made to clib/ctype.h.
	* unix/tty.c: Replace _tolower with tolower.
	* strichr.c: Likewise.
	* stricmp.c: Likewise.

	* clib/locale.h: Re-arrange the locale globals.
	* locale/setlocale.c: Fully implement setlocale().
	* locale/localeconv.c: Bix fixes.
	* locale/strcoll.c: New file.
	* locale/strxfrm.c: New file.
	* sys/syslib.c: Call setlocale() to initialise the ctype tables.

	* time/tzset.c: Replace __time_territory with __locale_territory.
	* time/strftime.c: Likewise.
	* time/stdtime.c: Likewise.
	* time/mktime.c: Likewise.
	* time/calendconv.c: Likewise.
	* time/broken.c: Likewise.

Sun Jul 13 00:00:00 1997 CL0014
Nick Burrett  <nick.burrett@btinternet.com>

	* ctime.c: Removed.
	* mktime.c: Removed.
	* unix/time.c: Removed.

	* clib/locale.h: New file.
	* clib/time.h: Prototype some internal functions.
	* time/_clock.s: New file.
	* time/asctime.c: New file.
	* time/broken.c: New file.
	* time/calendconv.c: New file.
	* time/ctime.c: New file.
	* time/difftime.c: New file.
	* time/gmtime.c: New file.
	* time/localtime.c: New file.
	* time/mktime.c: New file.
	* time/stdtime.c: New file.
	* time/strftime.c: New file.
	* time/time.c: New file.
	* time/times.c: New file.
	* time/tzset.c: New file.

	* locale/setlocale.c: New file.
	* locale/localeconv.c: New file.

	* unix/sysconf.c [_SC_CLK_TCK]: Return CLOCKS_PER_SEC, not 60.

Sat Jul 12 00:00:00 1997 CL0013
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_syslib.s: Relocate some code from here into their own
	separate compilation units.
	* sys/_memchk.s: New file.
	* sys/_profile.s: New file.
	* sys/_divtest.s: New file.
	* sys/_sdiv.s: New file.
	* sys/_smod.s: New file.
	* sys/_udiv.s: New file.
	* sys/_umod.s: New file.
	* sys/_sdiv10.s: New file.
	* sys/_udiv10.s: New file.
	* sys/_divsi3.s: New file.
	* sys/_modsi3.s: New file.
	* sys/_udivsi3.s: New file.
	* sys/_umodsi3.s: New file.

Mon Jun 30 00:00:00 1997 CL0012
Nick Burrett  <nick.burrett@btinternet.com>

	* abort.c (abort): Ensure application terminates if raise returns.

Sun Jun 29 00:00:00 1997 CL0011
Nick Burrett  <nick.burrett@btinternet.com>

	* signal/coredump.c (__backtrace): More stringent checks for
	out-of-bounds memory accesses.

Fri Jun 27 00:00:00 1997 CL0010
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* alloc.c: Comment out malloc_stats to remove stdio dependency.

	* clib/stdio.h [FILE]: Add __string_istream flag.
	(__underflow): Rename to __peekchar.
	[__UNIXLIB_INTERNALS]: Add.

	* clib/unixlib/fd.h [BADF]: Ensure an out-of-range fd will return
	true instead of false.

	* sys/syslib.c: Move __funcall_error from here.
	* common/funcallerr.c: Container file for __funcall_error.

	* signal/siginfo.c: Use os_print to remove stdio dependency.
	* stdio/filbuf.c: Check __string_istream flag.
	* stdio/fread.c: Likewise.
	* stdio/scanf.c (sscanf, vfscanf): Fix.
	* sys/exec.c: Call malloc_trim before copying parent process up in
	memory.
	* sys/_os.s (os_swi): Place in a READONLY code section.
	* time/setitmr.c (timer_controls): Make const.
	* unix/tty.c: Remove need to have global __t variable.
	* unix/unix.c: Local version of strtoul.
	[__sfix_default]: Created. Allows sfix string to be writable.
	(default_outfd): Fix assignment bug.

	* clib/stdlib.h (malloc_trim): Add prototype.

Thu Jun 26 00:00:00 1997 CL0009
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* resource/initialise.c: Use u_char* when performing arithmetic on
	__lomem and __break. Correct error where a non-dynamic area program
	had its data limit set to 1/4 of its real value.

	* sys/exec.c: realloc bug fixes.
	* sys/mman.c: Fix bad use of strncpy.
	* sys/_kernel.s (_kernel_osfile): New function.

Tue Jun 24 00:00:00 1997 CL0007
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/kernel.h (_kernel_udiv): Declare prototype.
	(_kernel_sdiv, _kennel_smod, _kernel_umod): Likewise.
	(_kernel_udiv10, _kernel_sdiv10, _kernel_fpavailable): Likewise
	* sys/_syslib.s (_kernel_udiv10): New function.
	(_kernel_sdiv10): New function.
	(_kernel_fpavailable): New function.

Sun Jun 22 00:00:00 1997 CL0008
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* mktime.c: Fixed gcc register must appear first warning.
	* clib/errno.h [__set_errno]: New macro.
	* clib/kernel.h [_kernel_last_oserror]: New structure.
	* clib/setjmp.h [__attribute__]: Undefine
	* clib/stdlib.h (_exit): Remove decl.
	[__UNIXLIB_INTERNALS]: Use.
	* clib/unistd.h (_exit): Add gcc's __noreturn__ attribute.
	(brk): Remove const qualifier.
	* clib/sys/os.h [__UNIXLIB_INTERNALS]: Use.
	* clib/sys/syslib.h (__funcall_error): Make 1st arg const.
	(__exit*): Add __noreturn__ attribute.
	(__real_break): Add.
	[__UNIXLIB_INTERNALS]: Use.
	* clib/unixlib/sigstate.h [__SIG_INVALID_P]: New macro.
	* signal/coredump.c (__backtrace): Don't restore exit handler.

	* signal/init.c: Use __set_errno and __SIG_INVALID_P.
	* signal/kill.c: Likewise.
	* signal/post.c: Likewise.
	* signal/raise.c: Likewise.
	* signal/sig*.c: Likewise.
	* signal/sleep.c: Likewise.

	* sys/exec.c: Reduce memory requirements of argv and argv[].
	* sys/vfork.c: Likewise.
	* unix/unix.c: Likewise. Set errno to E2BIG if command line too long.
	(__unixinit): Don't call lseek on tty.

	* sys/syslib.c (exit): Remove Nick Clark's change.

	* sys/_exec.s: Use __real_break instead of __break.
	* sys/_vfork.s: Likewise.

	* sys/_os.s (os_prhex): Adjust stack pointer so it is below buffer.
	* sys/_syslib.s (__real_break): Initialise.
	(_exit): Call __munmap_all.

	* unix/getenv.c: Don't set errno if variable was not found.
	* unix/putenv.c: Fix #include filename.

	* alloc.c: Latest version from Doug Lea.
	* sys/brk.c: Re-written.
	* sys/mman.c: New file.
	* clib/sys/mman.h: New file.
	* sys/_mman.s: New file.
	* sys/os.c (__seterr): Don't reset errno if there is no error.
	(__seterr_): Likewise.
	(__kernel_last_oserror): New function.


Sun Jun 22 00:00:00 1997 CL0006
Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/*.c (__fill_buffer): Rename from __underflow.
	* clib/stdio.h (__fill_buffer): Rename from __underflow.

Wed Jun 18 00:00:00 1997 CL0005
Nicholas Clark  <nickc@liv.ac.uk>

	* common/serial.c: Canonicalise the filename.

Tue Jun 17 00:00:00 1997 CL0004
Nicholas Clark  <nickc@liv.ac.uk>

	* errno.c: Initialise errno to zero.
	* clib/limits.h [QUAD_MAX]: Define.
	* clib/sys/os.h (__the_error): Renamed from the_error and made global.
	* stdio/scanf.c: Replace all 'char z' with 'int z'.
	* sys/sigsetjmp.c (__siglongjmp_helper): Add const to arg.

Mon Jun 16 00:00:00 1997 CL0003
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/fnmatch.c: New file.
	* clib/fnmatch.h: New file.

Sun Jun 15 00:00:00 1997 CL0002
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/unixlib/types.h (__sigset_t): Define.
	(__sig_atomic_t): Define.
	* clib/signal.h: Use __sigset_t, __sig_atomic_t.

	* clib/setjmp.h (sigsetjmp): Declare.
	(siglongjmp): Declare.
	* sys/sigsetjmp.c: New file.
	* sys/_jmp.s (sigsetjmp): New function.
	(siglongjmp): New function.

	* signal/sigprocmsk.c [SIG_BLOCK]: OR the mask instead of ANDing it.

Sat Jun 14 00:00:00 1997 CL0001
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdio.h (__underflow): Declare.
	* stdio/filbuf.c: Restructure.
	(__underflow): New function.
	* stdio/scanf.c [peekc]: Use __underflow.

Fri Jun 13 00:00:00 1997 CL0000
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdio.h (__getmode): Declare.
	(__steam_init): Declare.
	* stdio/fopen.c (freopen): Remove.
	(getmode): Remove
	(stream_init): Remove
	* stdio/newstream.c (__getmode): Define.
	(__stream_init): Define.
	* stdio/freopen.c: New file.
	* unix/reopen.c: New file.
	* clib/unixlib/local.h (__reopen): Declare.
